23 lines
1.1 KiB
Go
23 lines
1.1 KiB
Go
package model
|
|
|
|
type Stat struct {
|
|
ID int `gorm:"primaryKey;autoIncrement" json:"id"`
|
|
OrderCount int `gorm:"not null;default:0" json:"order_count"`
|
|
OrderTotal int64 `gorm:"not null;default:0" json:"order_total"`
|
|
PaidCount int `gorm:"not null;default:0" json:"paid_count"`
|
|
PaidTotal int64 `gorm:"not null;default:0" json:"paid_total"`
|
|
CommissionCount int `gorm:"not null;default:0" json:"commission_count"`
|
|
CommissionTotal int64 `gorm:"not null;default:0" json:"commission_total"`
|
|
RegisterCount int `gorm:"not null;default:0" json:"register_count"`
|
|
InviteCount int `gorm:"not null;default:0" json:"invite_count"`
|
|
TransferUsedTotal int64 `gorm:"not null;default:0" json:"transfer_used_total"`
|
|
RecordAt int64 `gorm:"not null;index" json:"record_at"`
|
|
RecordType string `gorm:"size:2;not null;index" json:"record_type"` // 'd' for daily, 'm' for monthly
|
|
CreatedAt int64 `gorm:"autoCreateTime" json:"created_at"`
|
|
UpdatedAt int64 `gorm:"autoUpdateTime" json:"updated_at"`
|
|
}
|
|
|
|
func (Stat) TableName() string {
|
|
return "v2_stat"
|
|
}
|