package models import "git.apinb.com/bsm-sdk/core/database" // DeliveryAccount 对应 delivery_account,保存配送点登录账户。 type DeliveryAccount struct { Entity // 公共实体字段 DeliveryBasicID uint64 `gorm:"column:delivery_basic_id;not null;index" json:"delivery_basic_id"` // delivery_basic_id 业务字段 Username string `gorm:"column:username;type:varchar(64);not null;uniqueIndex" json:"username"` // username 业务字段 DisplayName string `gorm:"column:display_name;type:varchar(64);not null;default:''" json:"display_name"` // display_name 业务字段 PasswordHash string `gorm:"column:password_hash;type:varchar(255);not null" json:"-"` // PasswordHash 业务字段 RoleCode string `gorm:"column:role_code;type:varchar(64);not null" json:"role_code"` // role_code 业务字段 } func init() { database.AppendMigrate(&DeliveryAccount{}) } func (table *DeliveryAccount) TableName() string { return "delivery_account" }