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"` Username string `gorm:"column:username;type:varchar(64);not null;uniqueIndex" json:"username"` DisplayName string `gorm:"column:display_name;type:varchar(64);not null;default:''" json:"display_name"` PasswordHash string `gorm:"column:password_hash;type:varchar(255);not null" json:"-"` RoleCode string `gorm:"column:role_code;type:varchar(64);not null" json:"role_code"` } func init() { database.AppendMigrate(&DeliveryAccount{}) } func (table *DeliveryAccount) TableName() string { return "delivery_account" }