- 业务组 MasterUid 改为 MasterUids(逗号分隔多用户ID) - 应用 OwnerId 改为 OwnerIds(逗号分隔多用户ID) - 前端负责人下拉框改为多选 - 权限查询改用 FIND_IN_SET 匹配多负责人 - 修复 user_permissions 表名错误(应为 user_permission) - 所有数据库实体添加 TableName() 方法显式指定表名 - xorm tag 显式指定 owner_ids/master_uids 列名 - 启动时自动清理 owner_ids 中的空格
21 lines
812 B
Go
21 lines
812 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type ClientInstance struct {
|
|
Id int `xorm:"int autoincr pk" json:"id"`
|
|
AppConfigId int `xorm:"int unique(udx_aaei)" json:"appConfigId"`
|
|
AppName string `xorm:"varchar(64) unique(udx_aaei)" json:"appName"`
|
|
Env string `xorm:"varchar(32) unique(udx_aaei)" json:"env"`
|
|
Ip string `xorm:"varchar(64) unique(udx_aaei)" json:"ip"`
|
|
LastPingAt *time.Time `xorm:"datetime" json:"lastPingAt"`
|
|
LastFetchAt *time.Time `xorm:"datetime" json:"lastFetchAt"`
|
|
LastFetchType string `xorm:"varchar(16)" json:"lastFetchType"`
|
|
CreatedAt *time.Time `xorm:"datetime" json:"createdAt"`
|
|
UpdatedAt *time.Time `xorm:"datetime" json:"updatedAt"`
|
|
}
|
|
|
|
func (ClientInstance) TableName() string {
|
|
return "client_instance"
|
|
}
|