完善定价与套餐关联表结构
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
type ResourceLong struct {
|
||||
ID int32 `json:"id" gorm:"column:id"` // ID
|
||||
ResourceID int32 `json:"resource_id" gorm:"column:resource_id"` // 套餐ID
|
||||
Code string `json:"code" gorm:"column:code"` // 套餐编码
|
||||
Live int32 `json:"live" gorm:"column:live"` // 可用时长(小时)
|
||||
Type ResourceMode `json:"type" gorm:"column:type"` // 套餐类型:1-包时,2-包量
|
||||
Quota int32 `json:"quota" gorm:"column:quota"` // 每日配额(包时)或总配额(包量)
|
||||
@@ -15,4 +16,6 @@ type ResourceLong struct {
|
||||
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"` // 最后使用时间
|
||||
|
||||
Sku *ProductSku `json:"sku,omitempty" gorm:"foreignKey:Code;references:Code"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user