2025-03-18 10:13:57 +08:00
|
|
|
|
// 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 models
|
|
|
|
|
|
|
2025-05-12 10:07:12 +08:00
|
|
|
|
import "platform/web/globals/orm"
|
2025-03-18 10:13:57 +08:00
|
|
|
|
|
2025-05-17 15:54:42 +08:00
|
|
|
|
const TableNameResourceShort = "resource_short"
|
2025-03-18 10:13:57 +08:00
|
|
|
|
|
2025-05-17 15:54:42 +08:00
|
|
|
|
// ResourceShort mapped from table <resource_short>
|
|
|
|
|
|
type ResourceShort struct {
|
2025-05-26 10:57:39 +08:00
|
|
|
|
ID int32 `gorm:"column:id;type:integer;primaryKey;autoIncrement:true;comment:ID" json:"id"` // ID
|
|
|
|
|
|
ResourceID int32 `gorm:"column:resource_id;type:integer;not null;comment:套餐ID" json:"resource_id"` // 套餐ID
|
|
|
|
|
|
Type int32 `gorm:"column:type;type:integer;not null;comment:套餐类型:1-包时,2-包量" json:"type"` // 套餐类型:1-包时,2-包量
|
|
|
|
|
|
Live int32 `gorm:"column:live;type:integer;not null;comment:可用时长(秒)" json:"live"` // 可用时长(秒)
|
|
|
|
|
|
Expire *orm.LocalDateTime `gorm:"column:expire;type:timestamp without time zone;comment:过期时间" json:"expire"` // 过期时间
|
|
|
|
|
|
Quota *int32 `gorm:"column:quota;type:integer;comment:配额数量" json:"quota"` // 配额数量
|
|
|
|
|
|
Used int32 `gorm:"column:used;type:integer;not null;comment:已用数量" json:"used"` // 已用数量
|
|
|
|
|
|
DailyLimit int32 `gorm:"column:daily_limit;type:integer;not null;comment:每日限制" json:"daily_limit"` // 每日限制
|
|
|
|
|
|
DailyUsed int32 `gorm:"column:daily_used;type:integer;not null;comment:今日已用数量" json:"daily_used"` // 今日已用数量
|
|
|
|
|
|
DailyLast *orm.LocalDateTime `gorm:"column:daily_last;type:timestamp without time zone;comment:今日最后使用时间" json:"daily_last"` // 今日最后使用时间
|
2025-03-18 10:13:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-05-17 15:54:42 +08:00
|
|
|
|
// TableName ResourceShort's table name
|
|
|
|
|
|
func (*ResourceShort) TableName() string {
|
|
|
|
|
|
return TableNameResourceShort
|
2025-03-18 10:13:57 +08:00
|
|
|
|
}
|