2026-07-28 08:44:54 +08:00
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
|
|
|
|
|
|
|
// ProductWarehouse 对应 product_warehouse,保存独立库房档案。
|
|
|
|
|
|
type ProductWarehouse struct {
|
2026-07-29 14:25:38 +08:00
|
|
|
|
Entity // 公共实体字段
|
|
|
|
|
|
Code string `gorm:"column:code;type:varchar(64);not null;uniqueIndex" json:"code"` // 库房编码
|
|
|
|
|
|
Name string `gorm:"column:name;type:varchar(128);not null" json:"name"` // 库房名称
|
|
|
|
|
|
Address string `gorm:"column:address;type:varchar(255);not null;default:''" json:"address"` // 库房地址
|
|
|
|
|
|
Manager string `gorm:"column:manager;type:varchar(64);not null;default:''" json:"manager"` // 库房负责人
|
|
|
|
|
|
Phone string `gorm:"column:phone;type:varchar(32);not null;default:''" json:"phone"` // 联系电话
|
2026-07-28 08:44:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() { database.AppendMigrate(&ProductWarehouse{}) }
|
|
|
|
|
|
func (table *ProductWarehouse) TableName() string { return "product_warehouse" }
|