gomod引用
This commit is contained in:
51
model/entity/order_monthly_statistics.go
Normal file
51
model/entity/order_monthly_statistics.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
// OrderMonthlyStatistics 订单月统计数据实体
|
||||
type OrderMonthlyStatistics struct {
|
||||
do.MongoBaseDO `bson:",inline"`
|
||||
ReportDate time.Time `bson:"report_date" json:"report_date"` // 统计日期(月份第一天)
|
||||
Period string `bson:"period" json:"period"` // 统计周期描述: 2024-01
|
||||
|
||||
// 订单基础统计
|
||||
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"` // 热门资产销量
|
||||
|
||||
// 月度趋势
|
||||
DailyOrders []int64 `bson:"daily_orders,omitempty" json:"daily_orders"` // 每日订单数(31天)
|
||||
DailyAmounts []int64 `bson:"daily_amounts,omitempty" json:"daily_amounts"` // 每日金额(31天)
|
||||
PeakDay int `bson:"peak_day,omitempty" json:"peak_day"` // 高峰日
|
||||
|
||||
// 环比增长率
|
||||
MonthOverMonthGrowth float64 `bson:"month_over_month_growth" json:"month_over_month_growth"` // 环比增长率
|
||||
}
|
||||
Reference in New Issue
Block a user