go-common/app/interface/bbq/app-bbq/model/model.go
2019-04-22 18:49:16 +08:00

78 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"encoding/json"
"go-common/library/time"
)
// 接口Action定义
const (
ActionRecommend = iota
ActionPlay
ActionLike
ActionCancelLike
ActionFollow
ActionCancelFollow
ActionCommentAdd
ActionCommentLike
ActionCommentReport
ActionFeedList
ActionShare
ActionDanmaku
ActionPlayPause
ActionPushRegister
ActionPushSucced
ActionPushCallback
ActionBlack
ActionCancelBlack
ActionVideoSearch
ActionUserSearch
ActionUserUnLike
)
// App platform
const (
PlatAndroid = iota + 1
PlatIOS
)
const (
// FeedListLen 为feed list中返回的数量
FeedListLen = 10
// SpaceListLen 空间长度
SpaceListLen = 20
// MaxInt64 用于最大int64
MaxInt64 = int64(^uint64(0) >> 1)
// BatchUserLen 批量请求用户信息时最大数量
BatchUserLen = 50
)
const (
//FromBILI video.from bilibili
FromBILI = 0
//FromBBQ video.from bbq
FromBBQ = 1
//FromCMS video.from cms
FromCMS = 2
)
// FeedMark record the struct which returned to app in feed api
type FeedMark struct {
LastSvID int64 `json:"last_svid"`
LastPubtime time.Time `json:"last_pubtime"`
IsRec bool `json:"is_rec"`
}
// CursorValue 用于cursor的定位这里可以当做通用结构使用使用者自己根据需求定义cursor_id的含义
type CursorValue struct {
CursorID int64 `json:"cursor_id"`
CursorTime time.Time `json:"cursor_time"`
}
//HTTPRpcRes ..
type HTTPRpcRes struct {
Code int `json:"code"`
Msg string `json:"message"`
Data json.RawMessage `json:"data"`
}