123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- package data
- import (
- "go-common/app/interface/main/creative/model/archive"
- upgrpc "go-common/app/service/main/up/api/v1"
- "go-common/app/service/main/up/model"
- )
- type ArchiveStat struct {
- Play int64 `json:"play"`
- Dm int64 `json:"dm"`
- Reply int64 `json:"reply"`
- Coin int64 `json:"coin"`
- Elec int64 `json:"elec"`
- Fav int64 `json:"fav"`
- Share int64 `json:"share"`
- }
- type ArchiveSource struct {
- Mainsite int64 `json:"mainsite"`
- Outsite int64 `json:"outsite"`
- Mobile int64 `json:"mobile"`
- Others int64 `json:"others"`
- WebPC int64 `json:"-"`
- WebH5 int64 `json:"-"`
- IOS int64 `json:"-"`
- Android int64 `json:"-"`
- }
- type ArchiveGroup struct {
- Fans int64 `json:"fans"`
- Guest int64 `json:"guest"`
- }
- type ArchiveArea struct {
- Location string `json:"location"`
- Count int64 `json:"count"`
- }
- type ArchiveData struct {
- ArchiveStat *ArchiveStat `json:"stat"`
- ArchiveSource *ArchiveSource `json:"source"`
- ArchiveGroup *ArchiveGroup `json:"group"`
- ArchiveAreas []*ArchiveArea `json:"area"`
- Videos []*archive.SimpleVideo `json:"videos,omitempty"`
- }
- type UpBaseStat struct {
- View int64 `json:"view"`
- Reply int64 `json:"reply"`
- Dm int64 `json:"dm"`
- Fans int64 `json:"fans"`
- Fav int64 `json:"fav"`
- Like int64 `json:"like"`
- }
- func (u *UpBaseStat) CopyTo(stat *model.UpBaseStat) {
- stat.Dm = u.Dm
- stat.Fans = u.Fans
- stat.Fav = u.Fav
- stat.View = u.View
- stat.Reply = u.Reply
- stat.Like = u.Like
- }
- func (u *UpBaseStat) CopyToReply(stat *upgrpc.UpBaseStatReply) {
- if u == nil {
- return
- }
- stat.Dm = u.Dm
- stat.Fans = u.Fans
- stat.Fav = u.Fav
- stat.View = u.View
- stat.Reply = u.Reply
- stat.Like = u.Like
- }
- type ViewerBase struct {
- Male int64 `json:"male"`
- Female int64 `json:"female"`
- AgeOne int64 `json:"age_one"`
- AgeTwo int64 `json:"age_two"`
- AgeThree int64 `json:"age_three"`
- AgeFour int64 `json:"age_four"`
- PlatPC int64 `json:"plat_pc"`
- PlatH5 int64 `json:"plat_h5"`
- PlatOut int64 `json:"plat_out"`
- PlatIOS int64 `json:"plat_ios"`
- PlatAndroid int64 `json:"plat_android"`
- PlatOtherApp int64 `json:"plat_other_app"`
- }
- type ViewerActionHour struct {
- View map[int]int `json:"view"`
- Reply map[int]int `json:"reply"`
- Dm map[int]int `json:"danmu"`
- Elec map[int]int `json:"elec"`
- Contract map[int]int `json:"contract"`
- }
- type Trend struct {
- Ty map[int]int64
- Tag map[int]int64
- }
- type UpDataIncrMeta struct {
- Incr int `json:"-"`
- TopAIDList map[int]int64 `json:"-"`
- TopIncrList map[int]int `json:"-"`
- Rank map[int]int `json:"-"`
- TyRank map[string]int `json:"-"`
- }
- const (
-
- Play = int8(1)
-
- Dm = int8(2)
-
- Reply = int8(3)
-
- Share = int8(4)
-
- Coin = int8(5)
-
- Fav = int8(6)
-
- Elec = int8(7)
- )
- var (
- typeNameMap = map[int8]string{
- Play: "play",
- Dm: "dm",
- Reply: "reply",
- Share: "share",
- Coin: "coin",
- Fav: "fav",
- Elec: "elec",
- }
- )
- func IncrTy(ty int8) (val string, ok bool) {
- val, ok = typeNameMap[ty]
- return
- }
|