Files
kami_scripts/order/model/sys_user_payment.gen.go

37 lines
2.2 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"
"gorm.io/gorm"
)
const TableNameSysUserPayment = "sys_user_payment"
// SysUserPayment mapped from table <sys_user_payment>
type SysUserPayment struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
UserID string `gorm:"column:user_id;primaryKey" json:"user_id"`
Balance float64 `gorm:"column:balance;not null;default:0.00;comment:余额" json:"balance"` // 余额
TotalDeposits float64 `gorm:"column:total_deposits;not null;default:0.00;comment:总充值金额" json:"total_deposits"` // 总充值金额
TotalConsumption float64 `gorm:"column:total_consumption;not null;default:0.00;comment:总消耗金额" json:"total_consumption"` // 总消耗金额
LastDepositTime time.Time `gorm:"column:last_deposit_time" json:"last_deposit_time"`
LastConsumptionTime time.Time `gorm:"column:last_consumption_time;comment:上次消耗时间" json:"last_consumption_time"` // 上次消耗时间
TotalDepositCount int32 `gorm:"column:total_deposit_count;not null;comment:总充值次数" json:"total_deposit_count"` // 总充值次数
TotalConsumptionCount int32 `gorm:"column:total_consumption_count;not null;comment:总消耗次数" json:"total_consumption_count"` // 总消耗次数
Status string `gorm:"column:status;comment:0.禁用 1.正常 3.关闭" json:"status"` // 0.禁用 1.正常 3.关闭
Notes string `gorm:"column:notes;comment:备注" json:"notes"` // 备注
CreatedAt time.Time `gorm:"column:created_at;not null" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}
// TableName SysUserPayment's table name
func (*SysUserPayment) TableName() string {
return TableNameSysUserPayment
}