fix platform workflow integrity and permissions

This commit is contained in:
david
2026-07-29 14:03:10 +08:00
parent afd9dbdeb5
commit d4799cd320
44 changed files with 797 additions and 224 deletions

View File

@@ -5,11 +5,11 @@ import "git.apinb.com/bsm-sdk/core/database"
// EcProduct 对应 ec_product保存可燃气体商品与服务。
type EcProduct struct {
Entity // 公共实体字段
EcCategoryID uint64 `gorm:"column:ec_category_id;not null;index" json:"ec_category_id"` // ec_category_id 业务字段
ProductCode string `gorm:"column:product_code;type:varchar(64);not null;uniqueIndex" json:"product_code"` // product_code 业务字段
Name string `gorm:"column:name;type:varchar(128);not null" json:"name"` // name 业务字段
PriceAmount int64 `gorm:"column:price_amount;not null;default:0" json:"price_amount"` // price_amount 业务字段
StockQuantity int `gorm:"column:stock_quantity;not null;default:0" json:"stock_quantity"` // stock_quantity 业务字段
EcCategoryID uint64 `gorm:"column:ec_category_id;not null;index" json:"ec_category_id"` // ec_category_id 业务字段
ProductCode string `gorm:"column:product_code;type:varchar(64);not null;uniqueIndex" json:"product_code"` // product_code 业务字段
Name string `gorm:"column:name;type:varchar(128);not null" json:"name"` // name 业务字段
PriceAmount int64 `gorm:"column:price_amount;not null;default:0;check:price_amount >= 0" json:"price_amount"` // price_amount 业务字段
StockQuantity int `gorm:"column:stock_quantity;not null;default:0;check:stock_quantity >= 0" json:"stock_quantity"` // stock_quantity 业务字段
}
func init() { database.AppendMigrate(&EcProduct{}) }