refactor: 对齐后端样例工程规范
This commit is contained in:
20
backend/api/internal/models/org_service_person.go
Normal file
20
backend/api/internal/models/org_service_person.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import "git.apinb.com/bsm-sdk/core/database"
|
||||
|
||||
// OrgServicePerson 对应 org_service_person,表示安装维修、安检或配送服务人员。
|
||||
type OrgServicePerson struct {
|
||||
Entity
|
||||
AccountIdentity string `gorm:"column:account_identity;type:uuid;uniqueIndex" json:"account_identity"` // 关联 idn_account 主键
|
||||
GasStationIdentity string `gorm:"column:gas_station_identity;type:uuid" json:"gas_station_identity"` // 归属气站主键
|
||||
DeliveryPointIdentity string `gorm:"column:delivery_point_identity;type:uuid" json:"delivery_point_identity"` // 主归属配送点主键
|
||||
Name string `gorm:"column:name;type:varchar(64);not null" json:"name"` // 服务人员姓名
|
||||
Roles string `gorm:"column:roles;type:varchar(128);not null" json:"roles"` // 可执行角色集合
|
||||
WorkStatus string `gorm:"column:work_status;type:varchar(32);not null" json:"work_status"` // 上班与接单状态
|
||||
CredentialStatus string `gorm:"column:credential_status;type:varchar(32);not null" json:"credential_status"` // 资质状态
|
||||
}
|
||||
|
||||
func init() { database.AppendMigrate(&OrgServicePerson{}) }
|
||||
|
||||
// TableName 返回与模型、文件名一致的单数数据表名。
|
||||
func (table *OrgServicePerson) TableName() string { return "org_service_person" }
|
||||
Reference in New Issue
Block a user