18 lines
1.0 KiB
Go
18 lines
1.0 KiB
Go
|
|
package models
|
|||
|
|
|
|||
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|||
|
|
|
|||
|
|
// ProductWarehouse 对应 product_warehouse,保存独立库房档案。
|
|||
|
|
type ProductWarehouse struct {
|
|||
|
|
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"` // 联系电话
|
|||
|
|
IsEnabled bool `gorm:"column:is_enabled;not null;default:false" json:"is_enabled"` // 是否启用
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func init() { database.AppendMigrate(&ProductWarehouse{}) }
|
|||
|
|
func (table *ProductWarehouse) TableName() string { return "product_warehouse" }
|