24 lines
1.2 KiB
Go
24 lines
1.2 KiB
Go
package models
|
|
|
|
// UserDailyStat 用户每日统计表
|
|
type UserDailyStat struct {
|
|
ID int64 `json:"id" gorm:"primarykey;comment:ID"`
|
|
UserID int64 `json:"user_id" gorm:"not null;default:0;comment:用户ID"`
|
|
UserName string `json:"user_name" gorm:"type:varchar(50);not null;default:'';comment:用户姓名"`
|
|
StatDate int64 `json:"stat_date" gorm:"type:bigint;not null;default:0;comment:统计日期(YYYYMMDD格式)"`
|
|
ReceivingNum int64 `json:"receiving_num" gorm:"not null;default:0;comment:入库次数"`
|
|
OutboundNum int64 `json:"outbound_num" gorm:"not null;default:0;comment:出库次数"`
|
|
SalesCount int64 `json:"sales_count" gorm:"not null;default:0;comment:销售订单数"`
|
|
CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:创建时间戳(秒)"`
|
|
UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:更新时间戳(秒)"`
|
|
IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"`
|
|
}
|
|
|
|
func (UserDailyStat) TableName() string {
|
|
return "user_daily_stat"
|
|
}
|
|
|
|
func (UserDailyStat) TableOptions() string {
|
|
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户每日统计表'"
|
|
}
|