tachybase_todo/packages/plugins/ui-schema-storage/src/collections/uiSchemaTemplates.ts
2022-07-04 23:48:19 +08:00

43 lines
751 B
TypeScript

import { defineCollection } from '@nocobase/database';
export default defineCollection({
name: 'uiSchemaTemplates',
autoGenId: false,
fields: [
{
type: 'uid',
name: 'key',
primaryKey: true,
},
{
type: 'string',
name: 'name',
},
{
type: 'string',
name: 'componentName',
},
{
type: 'string',
name: 'associationName',
},
{
type: 'string',
name: 'resourceName',
},
{
type: 'belongsTo',
name: 'uiSchema',
target: 'uiSchemas',
foreignKey: 'uid',
},
{
type: 'belongsTo',
name: 'collection',
target: 'collections',
foreignKey: 'collectionName',
targetKey: 'name',
},
],
});