优惠卷新增了用户数据

This commit is contained in:
2024-10-12 09:03:56 +08:00
parent 2cdeb0d299
commit bfa338d71f
3 changed files with 19 additions and 0 deletions
+1
View File
@@ -17,6 +17,7 @@ type UserCoupon struct {
ValidEndTime LocalTime `gorm:"column:valid_end_time;type:datetime;comment:过期使用时间" json:"valid_end_time"`
Model
Coupon *Coupon `gorm:"foreignKey:CouponId;references:coupon_id" json:"coupon"`
User *User `gorm:"foreignKey:UserId;references:user_id" json:"user"`
}
func (m *UserCoupon) TableName() string {