bindbox-game/internal/repository/mysql/model/user_coupon_ledger.gen.go

29 lines
1.6 KiB
Go

// 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 mapped from table <user_coupon_ledger>
type UserCouponLedger struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
UserID int64 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
UserCouponID int64 `gorm:"column:user_coupon_id;not null;comment:用户优惠券ID" json:"user_coupon_id"` // 用户优惠券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"` // 关联订单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
}