daShangDao_psiServer/models/response/statist.go
2026-06-15 13:47:39 +08:00

43 lines
1.8 KiB
Go

package response
// DashboardStatistResponse 仪表盘统计响应
type DashboardStatistResponse struct {
TotalReceivingCount int64 `json:"total_receiving_count"` // 总入库次数
TotalOutboundCount int64 `json:"total_outbound_count"` // 总出库次数
TotalSaleCount int64 `json:"total_sale_count"` // 今日商品总数
UserStats []UserStatItem `json:"user_stats"` // 个人统计数据
}
// UserStatItem 个人统计项
type UserStatItem struct {
UserID int64 `json:"user_id"` // 用户ID
UserName string `json:"user_name"` // 用户姓名
ReceivingCount int64 `json:"receiving_count"` // 入库次数
OutboundCount int64 `json:"outbound_count"` // 出库次数
}
// WarehouseStatistResponse 仓库统计响应
type WarehouseStatistResponse struct {
ProductTotal int64 `json:"product_total"` // 商品总量
InventoryTotal int64 `json:"inventory_total"` // 库存量
TodayInbound int64 `json:"today_inbound"` // 今日入库
TodayOutbound int64 `json:"today_outbound"` // 今日出库
YesterdayInbound int64 `json:"yesterday_inbound"` // 昨日入库
YesterdayOutbound int64 `json:"yesterday_outbound"` // 昨日出库
}
// OrderStatistResponse 订单统计响应
type OrderStatistResponse struct {
Today OrderStatItem `json:"today"` // 今日统计数据
Yesterday OrderStatItem `json:"yesterday"` // 昨日统计数据
}
// OrderStatItem 订单统计项
type OrderStatItem struct {
Quantity int64 `json:"quantity"` // 数量
Amount int64 `json:"amount"` // 金额(分)
Shipped int64 `json:"shipped"` // 已发货
Unshipped int64 `json:"unshipped"` // 未发货
Pending int64 `json:"pending"` // 待处理
}