micro-bundle/internal/model/valueAdd_bundle.go

40 lines
2.7 KiB
Go
Raw Permalink Normal View History

2025-03-25 08:30:09 +00:00
package model
2025-03-28 01:23:17 +00:00
import (
"gorm.io/plugin/soft_delete"
)
2025-03-25 08:30:09 +00:00
// 增值套餐
type ValueAddBundleProfile struct {
2025-03-28 01:23:17 +00:00
Id int32 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
UUID string `json:"uuid" gorm:"column:uuid;type:varchar(1024);comment:增值套餐UUID"`
Num int32 `json:"num" gorm:"column:num;type:int;comment:视频数量"`
OriginalPrice float32 `json:"originalPrice" gorm:"column:original_price;type:decimal(12,2);comment:原单价"`
DiscountPrice float32 `json:"discountPrice" gorm:"column:discount_price;type:decimal(12,2);comment:优惠单价"`
SavedAmount float32 `json:"savedAmount" gorm:"column:saved_amount;type:decimal(12,2);comment:节省金额"`
TotalPrice float32 `json:"totalPrice" gorm:"column:total_price;type:decimal(12,2);comment:套餐总价"`
DiscountPriceStatus bool `json:"discountPriceStatus" gorm:"column:discount_price_status;default:false;comment:优惠单价状态true等于 false约等于"`
Choose bool `json:"choose" gorm:"column:choose;default:false;comment:可选条数true可以 false不可以"`
2025-03-28 18:05:56 +00:00
//Type int32 `json:"type" gorm:"column:type;type:int;comment:类型 1:固定套餐 2:自定义套餐"`
2025-03-28 20:59:56 +00:00
PriceType int32 `json:"priceType" gorm:"column:price_type;type:int;comment:套餐价格类型 1:人民币 2:美元"`
Language string `json:"language" gorm:"column:language;type:varchar(32);comment:套餐语言 zh-CN EN"`
AddBundleCommonUid string `json:"addBundleCommonUid" gorm:"column:add_bundle_common_uid;type:varchar(1024);comment:套餐公共ID"`
CreatedAt int64 `gorm:"column:created_at;autoCreateTime"`
UpdatedAt int32 `gorm:"column:updated_at;autoCreateTime"`
DeletedAt soft_delete.DeletedAt
2025-03-25 08:30:09 +00:00
}
2025-03-28 18:05:56 +00:00
//func (ValueAddBundleProfile) TableName() string {
// return "value_add_bundle_profile2"
//}
2025-03-28 01:23:17 +00:00
//type ValueAddBundleRecord struct {
// gorm.Model
// UUID string `json:"uuid" gorm:"column:uuid;type:varchar(1024);comment:增值套餐UUID"`
// OriginalPrice float32 `json:"originalPrice" gorm:"column:original_price;type:decimal(12,2);comment:原单价"`
// ValueAddBundleNum int `json:"valueAddBundleNum" gorm:"column:value_add_bundle_num;type:int;comment:增值套餐数量"`
// DiscountPrice float32 `json:"discountPrice" gorm:"column:discount_price;type:decimal(12,2);comment:优惠单价"`
// SavedAmount float32 `json:"savedAmount" gorm:"column:saved_amount;type:decimal(12,2);comment:节省金额"`
// TotalPrice float32 `json:"totalPrice" gorm:"column:total_price;type:decimal(12,2);comment:增值套餐总价"`
//}