role.go 856 字节
package models

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain"
	"time"
)

type Role struct {
	tableName string `pg:"users.role,alias:role" comment:"角色"`
	// 角色ID
	RoleId int64 `pg:",pk"  comment:"角色ID"`
	// 企业id
	CompanyId int64 `comment:"企业id"`
	// 组织ID
	OrgId int64 `comment:"组织ID"`
	// 角色类型  1.普通角色  1024:超级管理员
	RoleType int `comment:"角色类型  1.普通角色  1024:超级管理员"`
	// 角色名称
	RoleName string `comment:"角色名称"`
	// 有权限的菜单
	AccessMenus []int64 `pg:",array" comment:"有权限的菜单"`
	// 描述
	Desc int64 `comment:"描述"`
	// 扩展数据
	Ext *domain.Ext `comment:"扩展数据"`
	// 创建时间
	CreatedAt time.Time `comment:"创建时间"`
	// 更新时间
	UpdatedAt time.Time `comment:"更新时间"`
}