package main import "time" // 弹幕 type LiveDM struct { Data LiveDmData `json:"data"` Cmd string `json:"cmd"` } type LiveDmData struct { Uid int64 `json:"uid"` Uname string `json:"uname"` Uface string `json:"uface"` RoomID int64 `json:"room_id"` FansMedalLevel int64 `json:"fans_medal_level"` FansMedalName string `json:"fans_medal_name"` FansMedalWearningStatus bool `json:"fans_medal_wearning_status"` GuardLevel int64 `json:"guard_level"` Msg string `json:"msg"` Timestamp int64 `json:"timestamp"` } type LiveGift struct { Data LiveGiftData `json:"data"` Cmd string `json:"cmd"` } type LiveGiftData struct { Uid int64 `json:"uid"` Uname string `json:"uname"` Uface string `json:"uface"` GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int64 `json:"gift_num"` Price int64 `json:"price"` Paid bool `json:"paid"` FansMedalLevel int64 `json:"fans_medal_level"` FansMedalName string `json:"fans_medal_name"` FansMedalWearningStatus bool `json:"fans_medal_wearning_status"` GuardLevel int64 `json:"guard_level"` Timestamp int64 `json:"timestamp"` RoomID int64 `json:"room_id"` AnchorInfo AnchorInfo `json:"anchor_info"` } type AnchorInfo struct { Uid int64 `json:"uid"` Uname string `json:"uname"` Uface string `json:"uface"` } type CouponRecord struct { Id uint `gorm:"column:id"` AccountId string `gorm:"column:account_id"` //账户ID AddCnt int `gorm:"column:add_cnt"` //礼劵变动数 Type int `gorm:"column:type"` //type:1 消耗 2:弹幕增加 3:打赏增加 4:贴纸兑换增加 5:礼包增加 6:新人礼包 BoxRecordId int `gorm:"column:box_record_id"` //礼盒ID PackRecordId int `gorm:"column:pack_record_id"` //礼包ID Day string `gorm:"column:day"` //日期 CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` GiftRecordId uint `gorm:"column:gift_record_id"` //礼品ID } type Account struct { Id uint `gorm:"column:id"` Username string `gorm:"column:username"` //用户名 Coupon int `gorm:"column:coupon"` //礼劵数 Paster int `gorm:"column:paster"` //贴纸数 CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` Token string `gorm:"column:token"` //token json Avatar string `gorm:"column:avatar"` //头像 Openid string `gorm:"column:openid"` Session string `gorm:"column:session"` //登录凭证 SessionExpire int64 `gorm:"column:session_expire"` //过期时间 LastHitCnt uint8 `gorm:"column:last_hit_cnt"` //最近未抽到SSR的次数 Code string `gorm:"column:code"` //用来和uid验证的验证码 Uid uint `gorm:"column:uid"` //直播间中粉丝的uid } type Config struct { Id int `gorm:"column:id"` Name string `gorm:"column:name"` Key string `gorm:"column:key"` //键名 Type int8 `gorm:"column:type"` Val1 string `gorm:"column:val1"` Val string `gorm:"column:val"` //键值 Beizhu string `gorm:"column:beizhu"` CreatedAt time.Time `gorm:"column:created_at"` UpdatedAt time.Time `gorm:"column:updated_at"` } type Liuyan struct { Cmd string `json:"cmd"` Data LiuyanData `json:"data"` } type LiuyanData struct { RoomID int `json:"room_id"` Uid int `json:"uid"` Uname string `json:"uname"` Uface string `json:"uface"` MessageID int `json:"message_id"` Message string `json:"message"` Rmb int64 `json:"rmb"` Timestamp int `json:"timestamp"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` GuardLevel int `json:"guard_level"` FansMedalLevel int `json:"fans_medal_level"` FansMedalName string `json:"fans_medal_name"` FansMedalWearningStatus bool `json:"fans_medal_wearning_status"` }