2026-07-27 00:18:42 +08:00
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
|
|
|
|
|
|
|
// DeliveryBasic 对应 delivery_basic,保存配送点主档案。
|
|
|
|
|
|
type DeliveryBasic struct {
|
2026-07-27 12:02:08 +08:00
|
|
|
|
Entity // 公共实体字段
|
2026-07-27 00:18:42 +08:00
|
|
|
|
DeliveryCode string `gorm:"column:delivery_code;type:varchar(32);not null;uniqueIndex" json:"delivery_code"` // 配送点编码
|
|
|
|
|
|
GasBasicID uint64 `gorm:"column:gas_basic_id;not null;default:0;index" json:"gas_basic_id"` // 所属可燃气体站自增主键,0 表示平台直属
|
|
|
|
|
|
Name string `gorm:"column:name;type:varchar(128);not null" json:"name"` // 配送点名称
|
|
|
|
|
|
Principal string `gorm:"column:principal;type:varchar(64);not null;default:''" json:"principal"` // 负责人
|
|
|
|
|
|
Address string `gorm:"column:address;type:varchar(255);not null;default:''" json:"address"` // 配送点地址
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() { database.AppendMigrate(&DeliveryBasic{}) }
|
|
|
|
|
|
|
|
|
|
|
|
// TableName 返回与模型、文件名一致的单数数据表名。
|
|
|
|
|
|
func (table *DeliveryBasic) TableName() string { return "delivery_basic" }
|