sys_authority.go 680 字节
Newer Older
Mr.奇淼('s avatar
Mr.奇淼( 已提交
1 2 3 4 5 6 7 8 9 10
package model

import (
	"time"
)

type SysAuthority struct {
	CreatedAt       time.Time
	UpdatedAt       time.Time
	DeletedAt       *time.Time     `sql:"index"`
11
	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:'角色ID';size:90"`
12 13
	AuthorityName   string         `json:"authorityName" gorm:"comment:'角色名'"`
	ParentId        string         `json:"parentId" gorm:"comment:'父角色ID'"`
Mr.奇淼('s avatar
Mr.奇淼( 已提交
14 15
	DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
	Children        []SysAuthority `json:"children" gorm:"-"`
Mr.奇淼('s avatar
Mr.奇淼( 已提交
16
	SysBaseMenus    []SysBaseMenu  `json:"menus" gorm:"many2many:sys_authority_menus;"`
L
Leonard Wang 已提交
17
}