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

17 lines
936 B
Go
Raw Permalink 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"
// 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" }