Files
platforms/backend/api/internal/models/ec_product.go

17 lines
783 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package models
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"`
ProductCode string `gorm:"column:product_code;type:varchar(64);not null;uniqueIndex" json:"product_code"`
Name string `gorm:"column:name;type:varchar(128);not null" json:"name"`
PriceAmount int64 `gorm:"column:price_amount;not null;default:0" json:"price_amount"`
StockQuantity int `gorm:"column:stock_quantity;not null;default:0" json:"stock_quantity"`
}
func init() { database.AppendMigrate(&EcProduct{}) }
func (table *EcProduct) TableName() string { return "ec_product" }