chore: restore file

This commit is contained in:
Chareice 2024-01-24 18:19:37 +08:00
parent 88de3b6b82
commit 476d0b869c
No known key found for this signature in database

View File

@ -0,0 +1,35 @@
import { defineCollection } from '@nocobase/database';
export default defineCollection({
name: 'databaseConnections',
duplicator: 'required',
model: 'DatabaseConnectionModel',
autoGenId: false,
fields: [
{
type: 'string',
name: 'name',
primaryKey: true,
},
{
type: 'string',
name: 'description',
},
{
type: 'json',
name: 'options',
},
{
type: 'hasMany',
name: 'collections',
target: 'remoteCollections',
foreignKey: 'connectionName',
},
{
type: 'hasMany',
name: 'connectionsRolesResourcesScopes',
target: 'connectionsRolesResourcesScopes',
foreignKey: 'connectionName',
},
],
});