Ai
1 Star 0 Fork 0

鹏程/studygolang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
role.go 954 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuxinhua 提交于 2017-11-14 22:52 +08:00 . 角色以及管理问题处理
// Copyright 2013 The StudyGolang Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// http://studygolang.com
// Author: polaris polaris@studygolang.com
package model
// 角色分界点:roleid 大于该值,则没有管理权限
const AdminMinRoleId = 7 // 晨读管理员
const (
// Master 站长
Master = iota + 1
AssistantMaster
Administrator
TopicAdmin
ResourceAdmin
ArticleAdmin
ReadingAdmin
)
// 角色信息
type Role struct {
Roleid int `json:"roleid" xorm:"pk autoincr"`
Name string `json:"name"`
OpUser string `json:"op_user"`
Ctime string `json:"ctime,omitempty" xorm:"created"`
Mtime string `json:"mtime,omitempty" xorm:"<-"`
}
// 角色权限信息
type RoleAuthority struct {
Roleid int `json:"roleid" xorm:"pk autoincr"`
Aid int `json:"aid"`
OpUser string `json:"op_user"`
Ctime string `json:"ctime" xorm:"<-"`
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/barry_zpc/studygolang.git
git@gitee.com:barry_zpc/studygolang.git
barry_zpc
studygolang
studygolang
master

搜索帮助