You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
846 B
19 lines
846 B
package model
|
|
|
|
import "time"
|
|
|
|
// AIUserQuota AI用户额度
|
|
type AIUserQuota struct {
|
|
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
|
UserId int64 `gorm:"column:user_id;uniqueIndex;not null" json:"userId"`
|
|
Balance float64 `gorm:"column:balance;type:decimal(10,4);default:0" json:"balance"`
|
|
TotalRecharged float64 `gorm:"column:total_recharged;type:decimal(10,4);default:0" json:"totalRecharged"`
|
|
TotalConsumed float64 `gorm:"column:total_consumed;type:decimal(10,4);default:0" json:"totalConsumed"`
|
|
FrozenAmount float64 `gorm:"column:frozen_amount;type:decimal(10,4);default:0" json:"frozenAmount"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
|
|
}
|
|
|
|
// TableName 指定表名
|
|
func (AIUserQuota) TableName() string {
|
|
return "ai_user_quota"
|
|
}
|
|
|