chance.go 20.4 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613
package protocol

import (
	"opp/models"
	"time"
)

//机会审核
//审核对象
const (
	AuditByDepartmentor = iota + 1 //部门长
	AuditByUser                    //指定用户
	AuditByRole                    //指定角色
	AuditBySpecailUser             //特殊人员
)

const (
	ActionTypeAnd = 1 //会签
	ActionTypeOr  = 2 //或签
)

//审核类型
const (
	FlowTypeNormal  = iota + 1 //正常审核流程
	FlowTypeSpecail            //特殊审核流程
)

//审核人为空
const (
	NoApproverPass    = 1 //自动通过
	NoApproverToAdmin = 2 //转交给公司管理员
)

//机会
//审核状态
const (
	ReviewStatusWait      = 0 //待处理
	ReviewStatusAuditging = 1 //待审核
	ReviewStatusReturn    = 2 //退回
	ReviewStatusPass      = 3 //通过
	ReviewStatusSubmit    = 4 //提交
	ReviewStatusAuditg    = 5 //审批中

	ReviewStatusAutoPass = 99 //自动审批通过
)

//公开状态
const (
	NoPublic           = -1 //未公开
	PublicToDepartment = 1  //部门公开
	PublicToCompany    = 2  //公司公开
)

const (
	ChanceStatusDelete = 1 //删除
	ChanceStatusClose  = 2 //关闭
)

/*Favorite 我的收藏/点赞*/
type FavoriteRequest struct {
	ObjectType int `json:"object_type" valid:"Required"` //收藏 点赞
	ChanceType int `json:"chance_type" valid:"Required"`
	//TagId   int `json:"tag_id"`  //标签id
	LastId   int64 `json:"lastId"`
	PageSize int   `json:"pageSize" valid:"Required"`
}
type FavoriteResponse struct {
	Total int               `json:"total"`
	Lists []*ChanceFavorite `json:"lists"`
}

/*SympathyAction 点赞,收藏*/
type SympathyActionRequest struct {
	MarkType     int   `json:"markType" valid:"Required"`   // 1.赞  2.收藏
	SourceType   int   `json:"sourceType" valid:"Required"` //protocol.SourceType //1.机会 2.评论
	Id           int64 `json:"id" valid:"Required"`         //机会编号 / 评论编号
	SympathyType int   `json:"sympathyType"`                //1:标记 0:取消标记
	ChanceId     int64 `json:"chanceId"`                    //机会编号
}
type SympathyActionResponse struct {
}

/*ChanceType 机会一级分类请求*/
type ChanceTypeRequest struct {
}
type ChanceTypeResponse struct {
	List []*models.ChanceType `json:"list"`
}

/*Templates 模板列表请求*/
type TemplatesRequest struct {
	ChanceTypeId int `json:"chanceTypeId" valid:"Required"`
}
type TemplatesResponse struct {
	Templates []*Template `json:"list"`
}

/*Template 模板详情*/
type TemplateRequest struct {
	ChanceTypeId int `json:"chanceTypeId" valid:"Required"`
	TemplateId   int `json:"templateId" valid:"Required"`
}
type TemplateResponse struct {
	Template *Template `json:"template"`
}

/*ChanceExample 机会示例*/
type ChanceExampleRequest struct {
	TemplateId int `json:"templateId" valid:"Required"`
}
type ChanceExampleResponse struct {
	Content string `json:"content"`
}

/*提交机会*/
type ChanceSubmitRequest struct {
	Id                int64     `json:"id"` // = 0添加  >0 编辑
	AuditTemplateId   int64     `json:"auditTemplateId" valid:"Required"`
	Content           string    `json:"content"`
	FormList          []*Form   `json:"formList" valid:"Required"`
	Speechs           []Speech  `json:"speechs"`
	Pictures          []Picture `json:"pictures"`
	Videos            []Video   `json:"videos"`
	RelatedDepartment int64     `json:"relatedDepartments" valid:"Required"`
}
type ChanceSubmitResponse struct {
}

/*ChanceUpdate 机会更新*/
type ChanceUpdateRequest struct {
	Id int64 `json:"id"` // = 0添加  >0 编辑
	//AuditTemplateId   int64     `json:"auditTemplateId" valid:"Required"`
	Content           string    `json:"content"`
	FormList          []*Form   `json:"formList" valid:"Required"`
	Speechs           []Speech  `json:"speechs"`
	Pictures          []Picture `json:"pictures"`
	Videos            []Video   `json:"videos"`
	RelatedDepartment int64     `json:"relatedDepartments"`

	IsPublish bool `json:"isPublish"` //是否重新发布
}
type ChanceUpdateResponse struct {
}

/*ChanceStatistics 首页-机会池统计*/
type ChanceStatisticsRequest struct {
}
type ChanceStatisticsResponse struct {
	ChanceTotal int               `json:"chanceTotal"`
	List        []ChanceTotalItem `json:"list"`
}

/*MyChance 我的机会*/
type MySubmitChanceRequest struct {
	LastId       int64 `json:"lastId"`
	PageSize     int   `json:"pageSize" valid:"Required"`
	ReviewStatus int8  `json:"reviewStatus"` //审核状态
}
type MySubmitChanceResponse struct {
	List  []CommonListItem `json:"list"`
	Total int              `json:"total"`
}

/*ChancePool 机会池*/
type ChancePoolRequest struct {
	LastId       int64 `json:"lastId"`
	PageSize     int   `json:"pageSize" valid:"Required"`
	ChanceTypeId int   `json:"chanceTypeId"` //0:所有机会 编号:对应机会类型编号的机会
}
type ChancePoolResponse struct {
	List  []CommonListItem `json:"list"`
	Total int              `json:"total"`
}

/*Permission 机会权限*/
//type ChancePermissionRequest struct {
//}
//type ChancePermissionResponse struct {
//	EditScore   int `json:"editScore"`
//	EditChance  int `json:"editChance"`
//	EditPublic  int `json:"editPublic"`
//	CloseChance int `json:"closeChance"`
//}

//我的机会列表
type ChanceItemOrm struct {
	Id            int64     `orm:"column(id)"`
	Uid           int64     `orm:"column(user_id)"`
	CreateTime    time.Time `orm:"column(create_at)"`
	UpdateTime    time.Time `orm:"column(update_at)"`
	ApproveTime   time.Time `orm:"column(chance_approve_time)"`
	SourceContent string    `orm:"column(source_content)"`
	Images        string    `orm:"column(images)"`
	Voices        string    `orm:"column(speechs)"`
	Videos        string    `orm:"column(videos)"`
	ReviewStatus  int       `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过

	ApproveData string `json:"approveData"` //审核数据
}

/*MyApproveChance 我审核的机会*/
type MyApproveChanceRequest struct {
	LastId       int64 `json:"lastId"`
	PageSize     int   `json:"pageSize" valid:"Required"`
	ReviewStatus int8  `json:"reviewStatus"` //审核状态
}
type MyApproveChanceResponse struct {
	List  []CommonListItem `json:"list"`
	Total int              `json:"total"`
}

//我的审核机会列表
type ChanceApproveItemOrm struct {
	ChanceUserId       int64     `orm:"column(user_id)"`
	CreateTime         time.Time `orm:"column(create_at)"`
	UpdateTime         time.Time `orm:"column(update_at)"`
	ChanceApproveTime  time.Time `orm:"column(chance_approve_time)"`
	SourceContent      string    `orm:"column(source_content)"`
	ChanceEnableStatus int       `orm:"column(enable_status)"`
	Images             string    `orm:"column(images)"`
	Voices             string    `orm:"column(speechs)"`
	Videos             string    `orm:"column(videos)"`
	ReviewStatus       int       `orm:"column(review_status)"`

	Id                int64     `orm:"column(id)"` //审核id
	ApproveTime       time.Time `orm:"column(approve_time)"`
	ApproveData       string    `orm:"column(approve_data)"`
	ApproveMessage    string    `orm:"column(approve_message)"`
	ApproveUserId     int64     `orm:"column(uid)"`
	ProcessCreateTime time.Time `orm:"column(process_create_time)"`
	ChanceId          int64     `orm:"column(chance_id)"` // 机会id
}

/*MyCollectChance  我的收藏*/
type MyCollectChanceRequest struct {
	LastId   int64 `json:"lastId"`
	PageSize int   `json:"pageSize" valid:"Required"`
}
type MyCollectChanceResponse struct {
	List  []*CommonListItem `json:"list"`
	Total int               `json:"total"`
}

/*MyThumbUpChance 我点赞的机会*/
type MyThumbUpChanceRequest struct {
	LastId   int64 `json:"lastId"`
	PageSize int   `json:"pageSize" valid:"Required"`
}
type MyThumbUpChanceResponse struct {
	List  []*CommonListItem `json:"list"`
	Total int               `json:"total"`
}

/*MyComment 我的评论*/
type MyCommentRequest struct {
	LastId   int64 `json:"lastId"`
	PageSize int   `json:"pageSize" valid:"Required"`
}
type MyCommentResponse struct {
	List  []*CommonListItem `json:"list"`
	Total int               `json:"total"`
}

//机会池列表
type ChancePoolItemOrm struct {
	ChanceId      int64     `orm:"column(id)"`
	Uid           int64     `orm:"column(user_id)"`
	CreateTime    time.Time `orm:"column(create_at)"`
	SourceContent string    `orm:"column(source_content)"`
	Images        string    `orm:"column(images)"`
	Voices        string    `orm:"column(speechs)"`
	Videos        string    `orm:"column(videos)"`
	ReviewStatus  int       `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过

	//ApproveData string `json:"approveData"` //审核数据
	TemplateId   int `orm:"column(audit_template_id)"`
	ChanceTypeId int `orm:"column(chance_type_id)"`

	CommentTotal int `orm:"column(comment_total)"`
	ZanTotal     int `orm:"column(zan_total)"`
	ViewTotal    int `orm:"column(view_total)"`
}

//机会池收藏列表项
type ChanceCollectItemOrm struct {
	ChanceId           int64     `orm:"column(id)"`
	ChanceUserId       int64     `orm:"column(user_id)"`
	CreateTime         time.Time `orm:"column(create_at)"`
	SourceContent      string    `orm:"column(source_content)"`
	ChanceEnableStatus int       `orm:"column(enable_status)"`
	ReviewStatus       int       `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过
	Images             string    `orm:"column(images)"`
	Voices             string    `orm:"column(speechs)"`
	Videos             string    `orm:"column(videos)"`
	PublishStatus      int       `orm:"column(publish_status)"` //公开状态

	//ApproveData string `json:"approveData"` //审核数据
	TemplateId   int `orm:"column(audit_template_id)"`
	ChanceTypeId int `orm:"column(chance_type_id)"`

	CommentTotal int `orm:"column(comment_total)"`
	ZanTotal     int `orm:"column(zan_total)"`
	ViewTotal    int `orm:"column(view_total)"`

	CollectId   int64     `orm:"column(collect_id)"`   //收藏id
	CollectTime time.Time `orm:"column(collect_time)"` //收藏时间

	//chance_id
	//ChanceId           int64     `orm:"column(id)"`
}

//机会池收藏列表项
type ChanceThumbUpItemOrm struct {
	ChanceId           int64     `orm:"column(id)"`
	ChanceUserId       int64     `orm:"column(user_id)"`
	CreateTime         time.Time `orm:"column(create_at)"`
	SourceContent      string    `orm:"column(source_content)"`
	ChanceEnableStatus int       `orm:"column(enable_status)"`
	ReviewStatus       int       `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过
	Images             string    `orm:"column(images)"`
	Voices             string    `orm:"column(speechs)"`
	Videos             string    `orm:"column(videos)"`
	PublishStatus      int       `orm:"column(publish_status)"` //公开状态

	//ApproveData string `json:"approveData"` //审核数据
	TemplateId   int `orm:"column(audit_template_id)"`
	ChanceTypeId int `orm:"column(chance_type_id)"`

	CommentTotal int `orm:"column(comment_total)"`
	ZanTotal     int `orm:"column(zan_total)"`
	ViewTotal    int `orm:"column(view_total)"`

	CollectId   int64     `orm:"column(collect_id)"`   //收藏id
	CollectTime time.Time `orm:"column(collect_time)"` //收藏时间
}

//我的评论
type ChanceCommentItemOrm struct {
	ChanceId           int64     `orm:"column(chance_id)"`
	Uid                int64     `orm:"column(chance_user_id)"`
	CreateTime         time.Time `orm:"column(create_at)"`
	SourceContent      string    `orm:"column(source_content)"`
	ChanceEnableStatus int       `orm:"column(enable_status)"`
	ReviewStatus       int       `orm:"column(review_status)"` //审核状态 1:待审核 2:被退回 3:已通过
	Images             string    `orm:"column(images)"`
	Voices             string    `orm:"column(speechs)"`
	Videos             string    `orm:"column(videos)"`
	PublishStatus      int       `orm:"column(publish_status)"` //公开状态

	CommentTotal int `orm:"column(comment_total)"`
	ZanTotal     int `orm:"column(zan_total)"`
	ViewTotal    int `orm:"column(view_total)"`

	CommentId      int64     `orm:"column(id)"`
	CommentContent string    `orm:"column(content)"`
	CommentTime    time.Time `orm:"column(comment_time)"`

	//被评论的对象
	CommentedUserId  int64     `orm:"column(commented_user_id)"`
	CommentedContent string    `orm:"column(commented_content)"`
	CommentedTime    time.Time `orm:"column(commented_time)"` //收藏时间

	//评论对象类型
	SourceType    int   `orm:"column(source_type)"`
	SourceId      int64 `orm:"column(source_id)"`
	IsRead        int64 `orm:"column(is_read)"`
	ReceiveUserId int64 `orm:"column(receive_user_id)"`
	SenderUserId  int64 `orm:"column(sender_user_id)"`
}

/*ChanceDetail 机会详情*/
type ChanceDetailRequest struct {
	Id int64 `json:"id"` //机会编号
}
type ChanceDetailResponse struct {
	ChanceDetail   ChanceItem     `json:"chance"`
	StatisticData  interface{}    `json:"statisticData"` //机会数据(是否收藏/点赞 浏览数 点赞总数 评论数)ChanceData
	ApproveData    *ApproveData   `json:"approveData"`
	ApproveProcess []*ProcessItem `json:"approveProcess"`
	ApproveAccess  *ApproveAccess `json:"approveAccess"` //
	ChanceType     NameItem       `json:"chanceType"`    //机会类型
	ChanceTemplate NameItem       `json:"template"`      //机会模板
	ReviewStatus   int            `json:"reviewStatus"`  //审核状态 1:待审核 2:被退回 3:已通过
}

type ChanceType struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
	Template
}

/*ChanceChangePublish 修改公开状态*/
type ChanceChangePublishRequest struct {
	ChanceId   int64      `json:"chanceId"`   //机会编号
	PublicData PublicData `json:"publicData"` // 公开数据
}
type ChanceChangePublishResponse struct {
}

/*ChanceChangeScore 修改评分*/
type ChanceChangeScoreRequest struct {
	ChanceId int64 `json:"chanceId"` //机会编号
	Score    Score `json:"score"`
}
type ChanceChangeScoreResponse struct {
	DiscoveryScore        float64 `json:"discoveryScore"`        //发现分
	DiscoveryScorePercent int     `json:"discoveryScorePercent"` //发现分-百分比
}

/*ChanceCalculateScore 计算发现分*/
type ChanceCalculateScoreRequest struct {
	Score Score `json:"score"`
}
type ChanceCalculateScoreResponse struct {
	DiscoveryScore        float64 `json:"discoveryScore"`        //发现分
	DiscoveryScorePercent int     `json:"discoveryScorePercent"` //发现分-百分比
}

/*ChanceDelete 机会删除*/
type ChanceDeleteRequest struct {
	Id int64 `json:"id"` //机会编号
}
type ChanceDeleteResponse struct {
}

type ChanceFavorite struct {
	Id       int64       `json:"id"`
	Favorite interface{} `json:"favorite"`
}

//机会详情
type ChanceDetail struct {
	Id         int64         `json:"id"`
	Provider   *BaseUserInfo `json:"provider"`
	IsCollect  bool          `json:"is_collect"`
	IsZan      bool          `json:"is_zan"`
	Content    string        `json:"content"`
	ChanceType int           `json:"chance_type"`

	//图片
	//视频
	//语音

	ViewTotal    int `json:"view_total"`
	CommentTotal int `json:"comment_total"`
	ZanTotal     int `json:"zan_total"`
}

//模板
type Template struct {
	Id       int64   `json:"id"`
	Name     string  `json:"name"`
	Doc      string  `json:"doc"`
	Icon     string  `json:"icon"`
	FormList []*Form `json:"formList"`
	Link     string  `json:"link"` //示例
}

//表单
type Form struct {
	Id          int    `json:"id"`
	Label       string `json:"label"`
	InputType   string `json:"inputType"`
	SectionType int8   `json:"sectionType"`
	Value       string `json:"value"`
	Required    int8   `json:"required"`
}

//清楚未填写的表单数据
func ClearEmptyForm(inputFormList []*Form) (FormList []*Form) {
	if len(inputFormList) == 0 {
		return
	}
	for i := range inputFormList {
		item := inputFormList[i]
		if len(item.Value) > 0 {
			FormList = append(FormList, item)
		}
	}
	return
}

//语音
type Speech struct {
	Path     string `json:"path"`
	Duration int    `json:"duration"`
}

//图片
type Picture struct {
	Path string `json:"path"`
	W    int    `json:"w"`
	H    int    `json:"h"`
}

//视频
type Video struct {
	Path     string `json:"path"`
	Cover    Cover  `json:"cover"` //封面
	Duration int    `json:"duration"`
}

//审批配置
type AuditConfig struct {
	NoApprover int8 `json:"no_approver"` //审核人空时:【1:自动通过】【2:转交给管理员】
}

//机会池 - 统计
type ChanceTotalItem struct {
	Id    int    `json:"id"`   //类型
	Name  string `json:"name"` //总数
	Total int    `json:"total"`
}

//机会列表 通用项
type CommonListItem struct {
	Chance      ChanceItem  `json:"chance,omitempty"`        //机会详情
	ChanceData  interface{} `json:"statisticData,omitempty"` //机会数据(是否收藏/点赞 浏览数 点赞总数 评论数)ChanceData
	Approve     interface{} `json:"approve,omitempty"`       //审核人 审核信息(时间) Approve
	ApproveData interface{} `json:"approveData,omitempty"`   //审核数据(公开状态 评分) ApproveData
	Message     interface{} `json:"message,omitempty"`       //消息
	CommentData interface{} `json:"commentData,omitempty"`   //评论
	CollectData interface{} `json:"collectData,omitempty"`   //收藏数据
	ThumbUpData interface{} `json:"thumbUpData,omitempty"`   //点赞数据
	//我审核的-通过
	Score interface{} `json:"score,omitempty"`

	//模板
	ChanceType     interface{} `json:"chanceType,omitempty"` //机会类型
	ChanceTemplate interface{} `json:"template,omitempty"`   //机会模板

	//我评论的 评论数据
	CommentedData interface{} `json:"commentedData,omitempty"`
	SourceType    int         `json:"sourceType,omitempty"` //类型 1:机会 2:评论

	ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭
	ReviewStatus int `json:"reviewStatus"` //审核状态

	ChanceId int64 `json:"chanceId"` //机会编号
}

type MsgCommonListItem struct {
	MsgId   int64      `json:"msgId"`            //消息id
	MsgTime int64      `json:"msgTime"`          //消息时间
	Chance  ChanceItem `json:"chance,omitempty"` //机会详情
	//ChanceData  interface{} `json:"statisticData,omitempty"` //机会数据(是否收藏/点赞 浏览数 点赞总数 评论数)ChanceData
	//Approve     interface{} `json:"approve,omitempty"`       //审核人 审核信息(时间) Approve
	//ApproveData interface{} `json:"approveData,omitempty"`   //审核数据(公开状态 评分) ApproveData
	Message     interface{} `json:"message,omitempty"`     //消息
	CommentData interface{} `json:"commentData,omitempty"` //评论
	CollectData interface{} `json:"collectData,omitempty"` //收藏数据
	ThumbUpData interface{} `json:"thumbUpData,omitempty"` //点赞数据
	//我审核的-通过
	Score interface{} `json:"score,omitempty"`

	//模板
	//ChanceType     interface{} `json:"chanceType,omitempty"` //机会类型
	//ChanceTemplate interface{} `json:"template,omitempty"`   //机会模板

	//我评论的 评论数据
	CommentedData interface{} `json:"commentedData,omitempty"`

	SourceType   int `json:"sourceType,omitempty"` //类型 1:机会 2:评论
	ChanceStatus int `json:"chanceStatus"`         //0:正常 1.删除 2.关闭
	ReviewStatus int `json:"reviewStatus"`         //审核状态

	IsRead   bool  `json:"isRead"`
	ChanceId int64 `json:"chanceId"` //机会编号
}
type ChanceItem struct {
	Id             int64         `json:"id"`
	CreateTime     int64         `json:"createTime"`
	CreateTimeCopy int64         `json:"createTimeCopy"`
	UpdateTime     int64         `json:"updateTime"`
	ApproveTime    int64         `json:"approveTime"`
	Provider       *BaseUserInfo `json:"provider"`
	FormList       []*Form       `json:"formList" valid:"Required"`
	Speechs        []Speech      `json:"speechs"`
	Pictures       []Picture     `json:"pictures"`
	Videos         []Video       `json:"videos"`
	PublicStatus   int           `json:"public_status"`
}
type ChanceData struct {
	ThumbsUpTotal int `json:"thumbsupTotal"` //点赞总数
	CommentTotal  int `json:"commentTotal"`  //评论总数
	PageViewTotal int `json:"pageViewTotal"` //评论总数

	IsThumbsUp bool `json:"isThumbsUp"` //是否点赞 1 点赞, 0 没有点赞
	IsCollect  bool `json:"isCollect"`  //是否收藏 1 是  0 否
}

//收藏数据
type CollectData struct {
	Id          int64 `json:"id"`
	CollectTime int64 `json:"collectTime"` //收藏时间
}

//点赞数据
type ThumbUpData struct {
	Id          int64       `json:"id"`
	Content     string      `json:"content"`     //点赞内容
	ThumbUpTime int64       `json:"thumbUpTime"` //收藏时间
	Provider    interface{} `json:"provider,omitempty"`
}

//评论内容
type CommentData struct {
	Id          int64  `json:"id"`          //评论编号
	Content     string `json:"content"`     //评论内容
	CommentTime int64  `json:"commentTime"` //评论时间
	//IsRead      bool   `json:"isRead"`      //是否已读
	Provider interface{} `json:"provider,omitempty"`
}