// Code generated by gorm.io/gen. DO NOT EDIT. // Code generated by gorm.io/gen. DO NOT EDIT. // Code generated by gorm.io/gen. DO NOT EDIT. package model import ( "time" ) const TableNameUserCouponLedger = "user_coupon_ledger" // UserCouponLedger 用户优惠券流水 type UserCouponLedger struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` UserID int64 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` UserCouponID int64 `gorm:"column:user_coupon_id;not null;comment:用户优惠券ID" json:"user_coupon_id"` ChangeAmount int64 `gorm:"column:change_amount;not null;comment:变动金额(分,负数表示扣减)" json:"change_amount"` BalanceAfter int64 `gorm:"column:balance_after;not null;comment:变动后余额(分)" json:"balance_after"` OrderID int64 `gorm:"column:order_id;comment:关联订单ID" json:"order_id"` Action string `gorm:"column:action;not null;comment:操作类型" json:"action"` CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP(3);comment:创建时间" json:"created_at"` } // TableName UserCouponLedger's table name func (*UserCouponLedger) TableName() string { return TableNameUserCouponLedger }