Merge pull request #191 from SyncrowIOT/feat/add-tag-to-list

list space model should list tags
This commit is contained in:
hannathkadher
2025-01-02 11:59:49 +04:00
committed by GitHub
2 changed files with 7 additions and 8 deletions

View File

@ -21,16 +21,14 @@ const mappingInclude: { [key: string]: any } = {
}, },
'space-model': { 'space-model': {
subspaceModels: 'subspace-model', subspaceModels: 'subspace-model',
spaceProductModels: 'space-product-model', tags: 'tag_model',
}, },
'subspace-model': { 'subspace-model': {
productModels: 'subspace-product-model', tags: 'tag_model',
}, },
'subspace-product-model': { tag_model: {
itemModels: true, tag_model: true,
}, product: true,
'space-product-model': {
items: true,
}, },
}; };

View File

@ -113,7 +113,8 @@ export class SpaceModelService {
pageable.where = { pageable.where = {
project: { uuid: param.projectUuid }, project: { uuid: param.projectUuid },
}; };
pageable.include = 'subspaceModels,tags,subspaceModels.tags'; pageable.include =
'subspaceModels,tags,subspaceModels.tags,tags.product,subspaceModels.tags.product';
const customModel = TypeORMCustomModel(this.spaceModelRepository); const customModel = TypeORMCustomModel(this.spaceModelRepository);