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