by Robin at 20240404
This commit is contained in:
parent
4bb95ee7c6
commit
8b3d7a96cb
|
@ -18,8 +18,14 @@ func (p *ApiCreateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
|
|||
switch util.DerefInt64(p.ZoneMoment.CType) {
|
||||
case consts.ZoneMomentCType_Paid:
|
||||
params = append(params, validator.NewInt64PtrParam("请确认创建动态的文字可见范围!", p.ZoneMoment.TextVisibleRange))
|
||||
params = append(params, validator.NewInt64PtrParam("请确认创建动态的媒体可见范围!", p.ZoneMoment.MediaVisibleRange))
|
||||
params = append(params, validator.NewInt64PtrParam("请确认创建动态的价格!", p.ZoneMoment.Price))
|
||||
switch util.DerefInt64(p.ZoneMoment.MType) {
|
||||
case consts.MediaTypeImg:
|
||||
params = append(params, validator.NewInt64PtrParam("请确认创建动态的媒体可见范围!", p.ZoneMoment.MediaVisibleRange))
|
||||
case consts.MediaTypeVideo:
|
||||
params = append(params, validator.NewInt64PtrParam("请确认创建动态是否要模糊封面!", p.ZoneMoment.IsBlurringCover))
|
||||
}
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ type ZoneMoment struct {
|
|||
MType *int64 `json:"m_type" bson:"m_type"` // 媒体类型,见: MediaType*
|
||||
TextVisibleRange *int64 `json:"text_visible_range" bson:"text_visible_range"` // 动态文字可见范围,单位行
|
||||
MediaVisibleRange *int64 `json:"media_visible_range" bson:"media_visible_range"` // 动态媒体可见范围,单位媒体个数
|
||||
IsBlurringCover *int64 `json:"is_blurring_cover" bson:"is_blurring_cover"` // 是否模糊封面
|
||||
TextAmount *int64 `json:"text_amount" bson:"text_amount"` // 动态文字总行
|
||||
MediaAmount *int64 `json:"media_amount" bson:"media_amount"` // 媒体总个数
|
||||
Price *int64 `json:"price" bson:"price"` // 单帖价格,单位人民币分
|
||||
|
|
Loading…
Reference in New Issue