chance.go 1.4 KB
package protocol

const (
	MarkFlag_Zan     = 1
	MarkFlag_Collect = 2
)

const(
	UnMarkFlag =0
	MarkFlag = 1 //是否标记   /点赞 /收藏
)

/*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"`
}

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

type Chance 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"`
}


/*SympathyAction */
type SympathyActionRequest struct {
	MarkType int `json:"mark_type" valid:"Required"` // 1.赞  2.收藏
	SourceType int `json:"source_type" valid:"Required"` //protocol.SourceType //机会 评论
	Id   int64  `json:"id" valid:"Required"`
	SympathyType int `json:"sympathy_type"`  //1:标记 0:取消标记
}
type SympathyActionResponse struct {
}