add casbin rbac

This commit is contained in:
landaiqing
2024-08-23 11:36:41 +08:00
parent e0f0c4c466
commit 014abca8f8
17 changed files with 210 additions and 11 deletions

View File

@@ -12,9 +12,10 @@ type ScaAuthPermission struct {
ID int64 `gorm:"column:id;type:bigint(20);primaryKey;comment:主键ID" json:"id"` // 主键ID
PermissionName *string `gorm:"column:permission_name;type:varchar(64);comment:权限名称" json:"permission_name"` // 权限名称
ParentID *int64 `gorm:"column:parent_id;type:bigint(20);comment:父ID" json:"parent_id"` // 父ID
Type *int64 `gorm:"column:type;type:tinyint(4);comment:类型 0 菜单 1 目录 2 按钮 -1其他" json:"type"` // 类型 0 菜单 1 目录 2 按钮 -1其他
Type *int64 `gorm:"column:type;type:tinyint(4);comment:类型 0 菜单 1 接口" json:"type"` // 类型 0 菜单 1 目录 2 按钮 -1其他
Path *string `gorm:"column:path;type:varchar(255);comment:路径" json:"path"` // 路径
Status *int64 `gorm:"column:status;type:tinyint(4);comment:状态 0 启用 1 停用" json:"status"` // 状态 0 启用 1 停用
Method *string `gorm:"column:method;type:varchar(20);comment:请求方式" json:"method"` // 请求方式
Icon *string `gorm:"column:icon;type:varchar(128);comment:图标" json:"icon"` // 图标
PermissionKey *string `gorm:"column:permission_key;type:varchar(64);comment:权限关键字" json:"permission_key"` // 权限关键字
Order *int64 `gorm:"column:order;type:int(11);comment:排序" json:"order"` // 排序