service/api/proto/streamer/proto/streamer_vo_api.go

92 lines
4.6 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 proto
import (
streamerlinkproto "service/api/proto/streamerlink/proto"
"service/dbstruct"
goproto "google.golang.org/protobuf/proto"
)
// 查询VO类
type ApiListExtVO struct {
Id *int64 `json:"id" bson:"_id"` // 主播表id
Name *string `json:"name" bson:"name"` // 用户名
UserId *int64 `json:"user_id" bson:"user_id"` // 业务Id
Avatar *dbstruct.MediaComponent `json:"avatar" bson:"avatar"` // 头像
Level *int64 `json:"level" bson:"level"` // 等级
Mid *int64 `json:"mid" bson:"mid"` // 用户表id
Gender *int64 `json:"gender" bson:"gender"` // 性别
Bio *string `json:"bio" bson:"bio"` // 个性签名
Cover *dbstruct.MediaComponent `json:"cover" bson:"cover"` // 封面
Shorts *dbstruct.MediaComponent `json:"shorts" bson:"shorts"` // 展示视频
Album *dbstruct.MediaComponent `json:"album" bson:"album"` // 相册
Age *int64 `json:"age" bson:"age"` // 年龄
Height *int64 `json:"height" bson:"height"` // 身高
Weight *int64 `json:"weight" bson:"weight"` // 体重
Constellation *string `json:"constellation" bson:"constellation"` // 星座
City *string `json:"city" bson:"city"` // 所在城市
WxAddWay *int64 `json:"wx_add_way" bson:"wx_add_way"` // 微信添加方式 0-主动添加客户1-客户付费解锁
Tag *[]string `json:"tag" bson:"tag"` // 主播标签
Platforms *[]*streamerlinkproto.StreamerLinkVO `json:"platforms" bson:"platforms"` // 平台
Fans *int64 `json:"fans" bson:"fans"` // 全网粉丝
WxPrice *int64 `json:"wx_price" bson:"wx_price"` // 微信价格
AutoResponseMessage *string `json:"auto_response_message" bson:"auto_response_message"` // 自动回复消息
Inviters *[]int64 `json:"inviters" bson:"inviters"` // 邀请人
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
WechatLockType *int32 `json:"wechat_lock_type"`
WechatContact *string `json:"wechat_contact"`
WechatCoinPrice *int64 `json:"wechat_coin_price"`
}
func (vo *ApiListExtVO) CopyAccount(account *dbstruct.Account) {
vo.Name = account.Name
vo.UserId = account.UserId
vo.Avatar = account.Avatar
vo.Level = account.Level
}
func (vo *ApiListExtVO) CopyStreamer(streamer *dbstruct.Streamer) {
vo.Id = streamer.Id
vo.Mid = streamer.Mid
vo.Gender = streamer.Gender
vo.Bio = streamer.Bio
vo.Cover = streamer.Cover
vo.Shorts = streamer.Shorts
vo.Album = streamer.Album
vo.Age = streamer.Age
vo.Height = streamer.Height
vo.Weight = streamer.Weight
vo.Constellation = streamer.Constellation
vo.City = streamer.City
vo.Tag = streamer.Tag
vo.Fans = streamer.Fans
vo.AutoResponseMessage = streamer.AutoResponseMessage
vo.Inviters = streamer.Inviters
vo.Ct = streamer.Ct
vo.Ut = streamer.Ut
}
func (vo *ApiListExtVO) CopyPlatforms(platforms *[]*streamerlinkproto.StreamerLinkVO) {
vo.Platforms = platforms
}
type ApiListWxIdVO struct {
Mid *int64 `json:"mid" bson:"mid"` // 用户表id
}
func (vo *ApiListWxIdVO) CopyStreamer(streamer *dbstruct.Streamer) {
vo.Mid = streamer.Mid
}
func (vo *ApiListExtVO) CopyUserVas(userVas *dbstruct.UserVasInfo) {
if userVas != nil {
vo.WechatLockType = goproto.Int32(userVas.WechatLockType)
vo.WechatContact = goproto.String(userVas.WechatContact)
vo.WechatCoinPrice = goproto.Int64(userVas.WechatCoinPrice)
}
}