feat: add super order detail snapshot
This commit is contained in:
@@ -166,10 +166,14 @@ type SuperOrderItem struct {
|
||||
AmountPaid int64 `json:"amount_paid"`
|
||||
Tenant *OrderTenantLite `json:"tenant"`
|
||||
Buyer *OrderBuyerLite `json:"buyer"`
|
||||
PaidAt string `json:"paid_at"`
|
||||
RefundedAt string `json:"refunded_at"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
// Snapshot 订单快照,包含下单时的关键参数与定价信息,便于审计回溯。
|
||||
Snapshot any `json:"snapshot"`
|
||||
// Items 订单明细行,用于展示具体内容与金额拆分。
|
||||
Items []SuperOrderItemLine `json:"items"`
|
||||
PaidAt string `json:"paid_at"`
|
||||
RefundedAt string `json:"refunded_at"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type OrderTenantLite struct {
|
||||
@@ -183,6 +187,18 @@ type OrderBuyerLite struct {
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
// SuperOrderItemLine 表示订单明细行。
|
||||
type SuperOrderItemLine struct {
|
||||
// ID 订单明细ID。
|
||||
ID int64 `json:"id"`
|
||||
// ContentID 购买的内容ID。
|
||||
ContentID int64 `json:"content_id"`
|
||||
// AmountPaid 该明细实付金额(分)。
|
||||
AmountPaid int64 `json:"amount_paid"`
|
||||
// Snapshot 明细快照,用于展示内容标题等历史信息。
|
||||
Snapshot any `json:"snapshot"`
|
||||
}
|
||||
|
||||
type OrderStatisticsResponse struct {
|
||||
TotalCount int64 `json:"total_count"`
|
||||
TotalAmountPaidSum int64 `json:"total_amount_paid_sum"`
|
||||
|
||||
Reference in New Issue
Block a user