package models type Purview struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` Parentid int64 `json:"pid"` // 父级ID Module int8 `json:"module"` // 所属应用类型 1.病友经营;2.科普号;3.血透经营;4.慢病管理; Name string `json:"name"` // 规则名称(也是菜单名) Urlfor string `json:"urlfor"` // 规则唯一英文标识,(Controller.Method) MenuIconClass string `gorm:"menu_icon_class" json:"menu_icon_class"` // 菜单图标的 css 样式 SuperAdminExclusive int8 `gorm:"super_admin_exclusive" json:"super_admin_exclusive"` // 是否为超级管理员专属 0否1是 Listorder int `json:"-"` // 排序ID Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用 CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间 Link string `gorm:"-" json:"link"` // urlfor 解析后的链接 Childs []*Purview `gorm:"-" json:"childs"` // 子节点 } func (Purview) TableName() string { return "sgj_user_purview" } type RolePurview struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT"` RoleId int64 OrgId int64 AppId int64 PurviewIds string Status int8 // 状态 0.无效 1.有效 2.禁用 CreateTime int64 `gorm:"column:ctime"` // 创建时间 ModifyTime int64 `gorm:"column:mtime"` // 修改时间 } func (RolePurview) TableName() string { return "sgj_user_role_purview" }