17 lines
984 B
Go
17 lines
984 B
Go
package models
|
||
|
||
import "git.apinb.com/bsm-sdk/core/database"
|
||
|
||
// GasAccount 对应 gas_account,保存可燃气体站登录账户。
|
||
type GasAccount struct {
|
||
Entity // 公共实体字段
|
||
GasBasicID uint64 `gorm:"column:gas_basic_id;not null;index" json:"gas_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(&GasAccount{}) }
|
||
func (table *GasAccount) TableName() string { return "gas_account" }
|