tachybase_todo/packages/plugin-permissions/src/collections/collections.ts
2021-03-19 21:27:42 +08:00

22 lines
422 B
TypeScript

import { extend } from '@nocobase/database';
export default extend({
name: 'collections',
fields: [
{
interface: 'linkTo',
title: '权限',
type: 'belongsToMany',
name: 'roles',
through: 'permissions',
sourceKey: 'name'
},
// {
// type: 'hasMany',
// name: 'permissions',
// sourceKey: 'name',
// foreignKey: 'collection_name'
// }
],
});