- 业务组 MasterUid 改为 MasterUids(逗号分隔多用户ID) - 应用 OwnerId 改为 OwnerIds(逗号分隔多用户ID) - 前端负责人下拉框改为多选 - 权限查询改用 FIND_IN_SET 匹配多负责人 - 修复 user_permissions 表名错误(应为 user_permission) - 所有数据库实体添加 TableName() 方法显式指定表名 - xorm tag 显式指定 owner_ids/master_uids 列名 - 启动时自动清理 owner_ids 中的空格
26 lines
1.0 KiB
Go
26 lines
1.0 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
type Application struct {
|
|
Id int `xorm:"int autoincr pk" json:"id"`
|
|
GroupId *int `xorm:"int" json:"groupId"`
|
|
Name string `xorm:"varchar(32)" json:"name"`
|
|
Code string `xorm:"varchar(32)" json:"code"`
|
|
ServiceId string `xorm:"varchar(64)" json:"serviceId"`
|
|
Token string `xorm:"varchar(64)" json:"token"`
|
|
OwnerIds string `xorm:"varchar(255) 'owner_ids'" json:"ownerIds"`
|
|
OwnerNames string `xorm:"varchar(255) 'owner_names'" json:"ownerNames"`
|
|
Remarks string `xorm:"text" json:"remarks"`
|
|
Enabled bool `xorm:"tinyint(1) default 1" json:"enabled"`
|
|
CreatedAt *time.Time `xorm:"datetime" json:"createdAt"`
|
|
CreatedBy string `xorm:"varchar(32)" json:"createdBy"`
|
|
UpdatedAt *time.Time `xorm:"datetime" json:"updatedAt"`
|
|
UpdatedBy string `xorm:"varchar(32)" json:"updatedBy"`
|
|
GroupName string `xorm:"-" json:"groupName,omitempty"`
|
|
}
|
|
|
|
func (Application) TableName() string {
|
|
return "application"
|
|
}
|