61 lines
2.1 KiB
Go
61 lines
2.1 KiB
Go
package proto
|
|
|
|
import (
|
|
streamerproto "service/api/proto/streamer/proto"
|
|
"service/bizcommon/util"
|
|
"service/dbstruct"
|
|
)
|
|
|
|
type ApiZoneMomentVO struct {
|
|
*dbstruct.ZoneMoment
|
|
StreamerExt *streamerproto.ApiListExtVO `json:"streamer_ext"`
|
|
IsZoneMomentThumbedUp int64 `json:"is_zone_moment_thumbed_up"`
|
|
IsIronfanshipUnlocked int64 `json:"is_ironfanship_unlocked"`
|
|
IsSuperfanshipUnlocked int64 `json:"is_superfanship_unlocked"`
|
|
IsZoneMomentUnlocked int64 `json:"is_zone_moment_unlocked"`
|
|
Expenditure int64 `json:"expenditure"`
|
|
IronfanshipPrice int64 `json:"ironfanship_price"`
|
|
IronfanshipCoinPrice int64 `json:"ironfanship_coin_price"`
|
|
BuyerCnt int64 `json:"buyer_cnt"` // 动态购买人数
|
|
IsSuperfanshipEnabled int64 `json:"is_superfanship_enabled"`
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) CopyZoneMoment(zonemoment *dbstruct.ZoneMoment) {
|
|
vo.ZoneMoment = zonemoment
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) CopyStreamerExt(streamerExt streamerproto.StreamerExtVO) {
|
|
if streamerExt != nil {
|
|
if apiStreamerExt, ok := streamerExt.(*streamerproto.ApiListExtVO); ok {
|
|
vo.StreamerExt = apiStreamerExt
|
|
}
|
|
}
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) GetMid() int64 {
|
|
return vo.ZoneMoment.GetMid()
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) GetZoneMomentId() int64 {
|
|
if vo.ZoneMoment != nil && vo.ZoneMoment.Id != nil {
|
|
return util.DerefInt64(vo.ZoneMoment.Id)
|
|
}
|
|
return -1
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) SetIsZoneMomentThumbedUp(is_zone_moment_thumbed_up int64) {
|
|
vo.IsZoneMomentThumbedUp = is_zone_moment_thumbed_up
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) SetIsIronfanshipUnlocked(is_ironfanship_unlocked int64) {
|
|
vo.IsIronfanshipUnlocked = is_ironfanship_unlocked
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) SetIsSuperfanshipUnlocked(is_superfanship_unlocked int64) {
|
|
vo.IsSuperfanshipUnlocked = is_superfanship_unlocked
|
|
}
|
|
|
|
func (vo *ApiZoneMomentVO) SetIsZoneMomentUnlocked(is_zone_moment_unlocked int64) {
|
|
vo.IsZoneMomentUnlocked = is_zone_moment_unlocked
|
|
}
|