删除修改

This commit is contained in:
苏尹岚
2020-10-12 17:01:08 +08:00
parent 20fcc857d5
commit 52b0778d59
9 changed files with 61 additions and 252 deletions

View File

@@ -220,58 +220,3 @@ func (v *UserMember) TableIndex() [][]string {
[]string{"CreatedAt"},
}
}
type Role struct {
ModelIDCULD
Name string `json:"name"` //角色名
}
func (*Role) TableUnique() [][]string {
return [][]string{
[]string{"Name", "DeletedAt"},
}
}
type UserRole struct {
ModelIDCULD
UserID string `orm:"column(user_id)" json:"userID"` //用户ID
RoleID int `orm:"column(role_id)" json:"roleID"` //角色ID
}
func (*UserRole) TableUnique() [][]string {
return [][]string{
[]string{"UserID", "RoleID", "DeletedAt"},
}
}
type Menu struct {
ModelIDCULD
Name string `json:"name"` //功能名
URL string `orm:"column(url)" json:"url"` //路径
ImgURL string `orm:"column(img_url)" json:"imgURL"` //图标
Level int `json:"level"` //级别
ParentID int `orm:"column(parent_id)" json:"parentID"` //父功能ID
Color string `json:"color"` //颜色
}
func (*Menu) TableUnique() [][]string {
return [][]string{
[]string{"Name", "DeletedAt"},
}
}
type RoleMenu struct {
ModelIDCULD
RoleID int `orm:"column(role_id)" json:"roleID"` //角色ID
MenuID int `orm:"column(menu_id)" json:"menuID"` //功能ID
}
func (*RoleMenu) TableUnique() [][]string {
return [][]string{
[]string{"MenuID", "RoleID", "DeletedAt"},
}
}