mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix: hotbugs in multi-tenant arch.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { Model } from 'objection';
|
||||
import path from 'path';
|
||||
import TenantModel from '@/models/TenantModel';
|
||||
import ResourceFieldMetadataCollection from '@/collection/ResourceFieldMetadataCollection';
|
||||
|
||||
@@ -17,23 +15,4 @@ export default class ResourceFieldMetadata extends TenantModel {
|
||||
static get collection() {
|
||||
return ResourceFieldMetadataCollection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Relationship mapping.
|
||||
*/
|
||||
static get relationMappings() {
|
||||
return {
|
||||
/**
|
||||
* Resource field may belongs to resource model.
|
||||
*/
|
||||
resource: {
|
||||
relation: Model.BelongsToOneRelation,
|
||||
modelBase: path.join(__dirname, 'Resource'),
|
||||
join: {
|
||||
from: 'resource_fields.resource_id',
|
||||
to: 'resources.id',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user