service/dbstruct/zonemoment.go

153 lines
5.9 KiB
Go
Raw Normal View History

2024-03-21 23:26:23 +08:00
package dbstruct
2024-06-13 16:40:22 +08:00
import "service/bizcommon/util"
2024-03-21 23:26:23 +08:00
type ZoneMoment struct {
2024-04-02 18:53:26 +08:00
Id *int64 `json:"id" bson:"_id"` // 私密圈动态表id
Mid *int64 `json:"mid" bson:"mid"` // 用户表id
Zid *int64 `json:"zid" bson:"zid"` // 所属空间id
2024-04-03 00:25:14 +08:00
CType *int64 `json:"c_type" bson:"c_type"` // 动态付费类型0-免费贴1-付费贴
IsIronfanVisible *int64 `json:"is_ironfan_visible" bson:"is_ironfan_visible"` // 铁粉是否可以免费看
2024-04-02 18:53:26 +08:00
Text *string `json:"text" bson:"text"` // 动态文字内容
2024-04-03 21:53:46 +08:00
MediaComp *MediaComponent `json:"media_component" bson:"media_component"` // 动态媒体内容
2024-04-03 00:25:14 +08:00
MType *int64 `json:"m_type" bson:"m_type"` // 媒体类型,见: MediaType*
2024-04-02 18:53:26 +08:00
TextVisibleRange *int64 `json:"text_visible_range" bson:"text_visible_range"` // 动态文字可见范围,单位行
MediaVisibleRange *int64 `json:"media_visible_range" bson:"media_visible_range"` // 动态媒体可见范围,单位媒体个数
2024-04-04 21:25:13 +08:00
IsBlurringCover *int64 `json:"is_blurring_cover" bson:"is_blurring_cover"` // 是否模糊封面
2024-04-02 18:53:26 +08:00
TextAmount *int64 `json:"text_amount" bson:"text_amount"` // 动态文字总行
MediaAmount *int64 `json:"media_amount" bson:"media_amount"` // 媒体总个数
2024-05-15 16:29:59 +08:00
IsCreatingPaidText *int64 `json:"is_creating_paid_text" bson:"is_creating_paid_text"` // 是否创建付费文案
PaidText *string `json:"paid_text" bson:"paid_text"` // 付费文案
2024-04-02 18:53:26 +08:00
Price *int64 `json:"price" bson:"price"` // 单帖价格,单位人民币分
ProductId *int64 `json:"product_id" bson:"product_id"` // 商品id(单帖商品或超粉商品id)
ThumbsUpNum *int64 `json:"thumbs_up_num" bson:"thumbs_up_num"` // 点赞次数
2024-04-02 22:47:41 +08:00
Status *int64 `json:"status" bson:"status"` // 审批状态
2024-04-29 15:31:54 +08:00
ImageAuditStatus *int64 `json:"image_audit_status" bson:"image_audit_status"` // 媒体审核状态
2024-04-02 18:53:26 +08:00
TextAuditStatus *int64 `json:"text_audit_status" bson:"text_audit_status"` // 文字审核状态
ManuallyReviewStatus *int64 `json:"manually_review_status" bson:"manually_review_status"` // 人工复审状态
2024-04-29 15:31:54 +08:00
ImageAuditOpinion *string `json:"image_audit_opinion" bson:"image_audit_opinion"` // 媒体审核意见
2024-04-02 18:53:26 +08:00
TextAuditOpinion *string `json:"text_audit_opinion" bson:"text_audit_opinion"` // 文字审核意见
ManuallyReviewOpinion *string `json:"manually_review_opinion" bson:"manually_review_opinion"` // 人工复审意见
ManuallyReviewOperator *int64 `json:"manually_review_operator" bson:"manually_review_operator"` // 人工复审操作人
2024-04-11 15:46:01 +08:00
IsHeaded *int64 `json:"is_headed" bson:"is_headed"` // 是否已置顶
2024-04-02 18:53:26 +08:00
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
2024-06-12 23:45:03 +08:00
CoinPrice int64 `json:"coin_price"` // 单帖价格,单位人民币分
2024-03-21 23:26:23 +08:00
}
2024-04-15 15:17:30 +08:00
func (p *ZoneMoment) GetId() int64 {
if p != nil && p.Id != nil {
return *p.Id
}
return 0
}
2024-03-21 23:26:23 +08:00
func (p *ZoneMoment) GetMid() int64 {
if p != nil && p.Mid != nil {
2024-04-15 15:17:30 +08:00
return *p.Mid
2024-03-21 23:26:23 +08:00
}
return 0
}
2024-04-16 07:41:52 +08:00
func (p *ZoneMoment) GetZid() int64 {
if p != nil && p.Zid != nil {
return *p.Zid
}
return 0
}
func (p *ZoneMoment) GetMType() int64 {
if p != nil && p.MType != nil {
return *p.MType
}
return 0
}
func (p *ZoneMoment) GetCType() int64 {
if p != nil && p.CType != nil {
return *p.CType
}
return 0
}
2024-04-18 17:43:12 +08:00
func (p *ZoneMoment) GetMediaVisibleRange() int64 {
if p != nil && p.MediaVisibleRange != nil {
return *p.MediaVisibleRange
}
return 0
}
func (p *ZoneMoment) GetIsIronfanVisible() int64 {
if p != nil && p.IsIronfanVisible != nil {
return *p.IsIronfanVisible
}
return 0
}
2024-04-16 07:41:52 +08:00
func (p *ZoneMoment) GetUt() int64 {
if p != nil && p.Ut != nil {
return *p.Ut
}
return 0
}
2024-04-27 00:47:18 +08:00
func (p *ZoneMoment) GetStatus() int64 {
if p != nil && p.Status != nil {
return *p.Status
}
return 0
}
2024-05-15 16:29:59 +08:00
func (p *ZoneMoment) GetIsCreatingPaidText() int64 {
if p != nil && p.IsCreatingPaidText != nil {
return *p.IsCreatingPaidText
}
return 0
}
2024-05-16 14:40:22 +08:00
func (p *ZoneMoment) GetText() string {
if p != nil && p.Text != nil {
return *p.Text
}
return ""
}
func (p *ZoneMoment) GetPaidText() string {
if p != nil && p.PaidText != nil {
return *p.PaidText
}
return ""
}
2024-06-13 16:40:22 +08:00
2024-06-13 19:22:03 +08:00
func (p *ZoneMoment) GetPrice() int64 {
if p != nil && p.Price != nil {
return *p.Price
}
return 0
}
2024-06-13 16:40:22 +08:00
func (p *ZoneMoment) GetCoinPrice() int64 {
2024-06-13 19:22:03 +08:00
return util.RoundUp(float64(p.GetPrice()) / 10.0)
2024-06-13 16:40:22 +08:00
}
2024-06-15 13:24:23 +08:00
2024-05-29 10:48:29 +08:00
type ZoneMomentStatInfo struct {
Mid *int64 `json:"id" bson:"_id"` // mid
Count *int64 `json:"count" bson:"count"` // count
}
func (p *ZoneMomentStatInfo) GetMid() int64 {
if p != nil && p.Mid != nil {
return *p.Mid
}
return 0
}
func (p *ZoneMomentStatInfo) GetCount() int64 {
if p != nil && p.Count != nil {
return *p.Count
}
return 0
2024-06-15 13:24:23 +08:00
2024-05-29 10:48:29 +08:00
}