package promo_usage import "time" type PromoUsage struct { Id int64 `gorm:"type:bigint unsigned;primaryKey"` UserId int64 `gorm:"type:bigint unsigned;not null;index:idx_user_rule,priority:1;comment:User Id"` PromoRuleId int64 `gorm:"type:bigint unsigned;not null;index:idx_user_rule,priority:2;comment:Promo Rule Id"` SubscribeId int64 `gorm:"type:bigint unsigned;not null;comment:Subscribe Id"` OrderNo string `gorm:"type:varchar(255);not null;default:'';index:idx_order_no;comment:Order No"` PromoPrice int64 `gorm:"type:bigint;not null;default:0;comment:Promo Price"` CreatedAt time.Time `gorm:"<-:create;comment:Create Time"` } func (PromoUsage) TableName() string { return "promo_usage" }