fix(plugin-acl): adjust roles collection options

This commit is contained in:
chenos 2022-02-19 17:15:42 +08:00
parent 407f9d2d85
commit 72b66a028c

View File

@ -7,6 +7,7 @@ export default {
{ {
type: 'uid', type: 'uid',
name: 'name', name: 'name',
prefix: 'r_',
primaryKey: true, primaryKey: true,
}, },
{ {
@ -43,12 +44,14 @@ export default {
type: 'belongsToMany', type: 'belongsToMany',
name: 'menuUiSchemas', name: 'menuUiSchemas',
target: 'uiSchemas', target: 'uiSchemas',
targetKey: 'uid',
}, },
{ {
type: 'hasMany', type: 'hasMany',
name: 'resources', name: 'resources',
target: 'rolesResources', target: 'rolesResources',
sourceKey: 'name', sourceKey: 'name',
targetKey: 'name',
}, },
], ],
} as CollectionOptions; } as CollectionOptions;