gomod引用
This commit is contained in:
53
model/entity/order_quarterly_statistics.go
Normal file
53
model/entity/order_quarterly_statistics.go
Normal file
@@ -0,0 +1,53 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
// OrderQuarterlyStatistics 订单季度统计数据实体
|
||||
type OrderQuarterlyStatistics struct {
|
||||
do.MongoBaseDO `bson:",inline"`
|
||||
ReportDate time.Time `bson:"report_date" json:"report_date"` // 统计日期(季度第一天)
|
||||
Period string `bson:"period" json:"period"` // 统计周期描述: 2024-Q1
|
||||
Quarter int `bson:"quarter" json:"quarter"` // 季度: 1,2,3,4
|
||||
|
||||
// 订单基础统计
|
||||
TotalOrders int64 `bson:"total_orders" json:"total_orders"` // 总订单数
|
||||
CompletedOrders int64 `bson:"completed_orders" json:"completed_orders"` // 已完成订单数
|
||||
CancelledOrders int64 `bson:"cancelled_orders" json:"cancelled_orders"` // 已取消订单数
|
||||
PaidOrders int64 `bson:"paid_orders" json:"paid_orders"` // 已支付订单数
|
||||
|
||||
// 金额统计(单位:分)
|
||||
TotalAmount int64 `bson:"total_amount" json:"total_amount"` // 订单总金额
|
||||
PaidAmount int64 `bson:"paid_amount" json:"paid_amount"` // 已支付金额
|
||||
RefundAmount int64 `bson:"refund_amount" json:"refund_amount"` // 退款金额
|
||||
NetAmount int64 `bson:"net_amount" json:"net_amount"` // 净收入金额
|
||||
|
||||
// 业务指标
|
||||
AverageOrderValue int64 `bson:"average_order_value" json:"average_order_value"` // 平均客单价
|
||||
PaymentRate float64 `bson:"payment_rate" json:"payment_rate"` // 支付成功率
|
||||
CompletionRate float64 `bson:"completion_rate" json:"completion_rate"` // 完成率
|
||||
|
||||
// 用户统计
|
||||
UniqueUsers int64 `bson:"unique_users" json:"unique_users"` // 唯一用户数
|
||||
NewUsers int64 `bson:"new_users" json:"new_users"` // 新用户数
|
||||
ReturningUsers int64 `bson:"returning_users" json:"returning_users"` // 回头用户数
|
||||
|
||||
// 商品统计
|
||||
TotalItems int64 `bson:"total_items" json:"total_items"` // 商品总数量
|
||||
UniqueAssets int64 `bson:"unique_assets" json:"unique_assets"` // 唯一资产数
|
||||
TopAssetID string `bson:"top_asset_id,omitempty" json:"top_asset_id"` // 热门资产ID
|
||||
TopAssetName string `bson:"top_asset_name,omitempty" json:"top_asset_name"` // 热门资产名称
|
||||
TopAssetCount int64 `bson:"top_asset_count,omitempty" json:"top_asset_count"` // 热门资产销量
|
||||
|
||||
// 月度分解
|
||||
MonthlyOrders []int64 `bson:"monthly_orders,omitempty" json:"monthly_orders"` // 月度订单数(3个月)
|
||||
MonthlyAmounts []int64 `bson:"monthly_amounts,omitempty" json:"monthly_amounts"` // 月度金额(3个月)
|
||||
PeakMonth int `bson:"peak_month,omitempty" json:"peak_month"` // 高峰月份
|
||||
|
||||
// 环比/同比增长率
|
||||
QuarterOverQuarterGrowth float64 `bson:"quarter_over_quarter_growth" json:"quarter_over_quarter_growth"` // 环比增长率
|
||||
YearOverYearGrowth float64 `bson:"year_over_year_growth" json:"year_over_year_growth"` // 同比增长率
|
||||
}
|
||||
Reference in New Issue
Block a user