service/dbstruct/daily_statement_zone_info.go

84 lines
2.7 KiB
Go
Raw Permalink Normal View History

2024-05-15 09:58:45 +08:00
package dbstruct
2024-05-18 00:12:54 +08:00
import (
goproto "google.golang.org/protobuf/proto"
)
2024-05-15 09:58:45 +08:00
type DailyStatementZoneInfo struct {
2024-05-15 12:13:02 +08:00
Id *int64 `json:"id" bson:"_id"` // 每日报表id
2024-05-18 00:12:54 +08:00
Mid *int64 `json:"mid" bson:"mid"` // mid
2024-05-15 12:13:02 +08:00
Zid *int64 `json:"zid" bson:"zid"` // 空间id
EntrantNum *int64 `json:"entrant_num" bson:"entrant_num"` // 上小时新增空间进入人数(不含退款)
TotalAmount *int64 `json:"total_amount" bson:"total_amount"` // 上小时总入账
AdmissionAmount *int64 `json:"admission_amount" bson:"admission_amount"` // 成员入账
ZoneMomentAmount *int64 `json:"zone_moment_amount" bson:"zone_moment_amount"` // 帖子入账
SuperfanshipAmount *int64 `json:"superfanship_amount" bson:"superfanship_amount"` // 超粉入账
RefundAmount *int64 `json:"refund_amount" bson:"refund_amount"` // 退款金额
RefunderAmount *int64 `json:"refunder_amount" bson:"refunder_amount"` // 退款人数
StartTime *int64 `json:"start_time" bson:"start_time"` // 起始时间
EndTime *int64 `json:"end_time" bson:"end_time"` // 结束时间
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}
2024-05-18 00:12:54 +08:00
func (p *DailyStatementZoneInfo) GetMid() int64 {
if p != nil && p.Mid != nil {
return *p.Mid
}
return 0
}
2024-05-15 12:13:02 +08:00
func (p *DailyStatementZoneInfo) GetTotalAmount() int64 {
if p != nil && p.TotalAmount != nil {
return *p.TotalAmount
}
return 0
}
2024-05-15 09:58:45 +08:00
2024-05-15 12:13:02 +08:00
func (p *DailyStatementZoneInfo) GetEntrantNum() int64 {
if p != nil && p.EntrantNum != nil {
return *p.EntrantNum
}
return 0
2024-05-15 09:58:45 +08:00
}
2024-05-18 00:12:54 +08:00
func (p *DailyStatementZoneInfo) Fill() {
if p == nil {
return
}
if p.Mid == nil {
p.Mid = goproto.Int64(0)
}
if p.Zid == nil {
p.Zid = goproto.Int64(0)
}
if p.EntrantNum == nil {
p.EntrantNum = goproto.Int64(0)
}
if p.TotalAmount == nil {
p.TotalAmount = goproto.Int64(0)
}
if p.AdmissionAmount == nil {
p.AdmissionAmount = goproto.Int64(0)
}
if p.ZoneMomentAmount == nil {
p.ZoneMomentAmount = goproto.Int64(0)
}
if p.SuperfanshipAmount == nil {
p.SuperfanshipAmount = goproto.Int64(0)
}
if p.RefundAmount == nil {
p.RefundAmount = goproto.Int64(0)
}
if p.RefunderAmount == nil {
p.RefunderAmount = goproto.Int64(0)
}
if p.StartTime == nil {
p.StartTime = goproto.Int64(0)
}
if p.EndTime == nil {
p.EndTime = goproto.Int64(0)
}
}