tachybase_todo/packages/plugins/acl/src/collections/rolesResourcesActions.ts

29 lines
547 B
TypeScript
Raw Normal View History

import { CollectionOptions } from '@nocobase/database';
export default {
name: 'rolesResourcesActions',
model: 'RoleResourceActionModel',
fields: [
{
type: 'belongsTo',
name: 'resource',
foreignKey: 'rolesResourceId',
target: 'rolesResources',
},
{
type: 'string',
name: 'name',
},
{
type: 'array',
name: 'fields',
defaultValue: [],
},
{
type: 'belongsTo',
name: 'scope',
target: 'rolesResourcesScopes',
},
],
} as CollectionOptions;