diff --git a/business/model/user.go b/business/model/user.go index eedd4962f..950d2c554 100644 --- a/business/model/user.go +++ b/business/model/user.go @@ -210,3 +210,37 @@ func (v *UserMember) TableIndex() [][]string { []string{"CreateAt"}, } } + +type Role struct { + ModelIDCULD + + Name string `json:"name"` //角色名 +} + +func (*Role) TableUnique() [][]string { + return [][]string{ + []string{"Name"}, + } +} + +type UserRole struct { + ModelIDCULD + + Name string `json:"name"` //角色名 +} + +type Function 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 +} + +func (*Function) TableUnique() [][]string { + return [][]string{ + []string{"Name"}, + } +}