access.go 1006 B

12345678910111213141516171819
  1. package models
  2. // Access 权限模型
  3. type Access struct {
  4. ID string `bson:"_id" json:"id,omitempty"`
  5. ModuleName string `bson:"module_name" json:"module_name,omitempty"` // 模块名称
  6. ActionName string `bson:"action_name" json:"action_name,omitempty"` // 操作名称
  7. ParentId string `bson:"parent_id" json:"parent_id,omitempty"` // 父级ID
  8. Type int `bson:"type" json:"type,omitempty"` // 节点类型 : 1、表示模块 2、表示菜单 3、操作
  9. URL string `bson:"url" json:"url,omitempty"` // 路由跳转地址
  10. Sort int `bson:"sort" json:"sort,omitempty"` // 排序
  11. Description string `bson:"description" json:"description,omitempty"` // 描述
  12. Status int `bson:"status" json:"status,omitempty"` // 状态 1、正常 2、禁用
  13. AddTime int `bson:"add_time" json:"add_time,omitempty"` // 添加时间
  14. }
  15. func (Access) TableName() string {
  16. return "access"
  17. }