17 lines
936 B
Go
17 lines
936 B
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"` // 联系电话
|
||
}
|
||
|
||
func init() { database.AppendMigrate(&ProductWarehouse{}) }
|
||
func (table *ProductWarehouse) TableName() string { return "product_warehouse" }
|