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

17 lines
984 B
Go
Raw Permalink 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"
// 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" }