Files
platform/web/models/resource_long.go

19 lines
1.0 KiB
Go
Raw Normal View History

package models
import (
"time"
)
// ResourceLong 长效动态套餐表
type ResourceLong struct {
2025-12-15 14:48:30 +08:00
ID int32 `json:"id" gorm:"column:id"` // ID
ResourceID int32 `json:"resource_id" gorm:"column:resource_id"` // 套餐ID
Live int32 `json:"live" gorm:"column:live"` // 可用时长(小时)
Type ResourceMode `json:"type" gorm:"column:type"` // 套餐类型1-包时2-包量
Quota int32 `json:"quota" gorm:"column:quota"` // 每日配额(包时)或总配额(包量)
ExpireAt *time.Time `json:"expire_at,omitempty" gorm:"column:expire_at"` // 套餐过期时间,包时模式可用
Used int32 `json:"used" gorm:"column:used"` // 总用量
Daily int32 `json:"daily" gorm:"column:daily"` // 当日用量
LastAt *time.Time `json:"last_at,omitempty" gorm:"column:last_at"` // 最后使用时间
}