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

19 lines
1.1 KiB
Go
Raw 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"
// DeliveryBasic 对应 delivery_basic保存配送点主档案。
type DeliveryBasic struct {
Entity // 公共实体字段
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" }