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': {
subspaceModels: 'subspace-model',
spaceProductModels: 'space-product-model',
tags: 'tag_model',
},
'subspace-model': {
productModels: 'subspace-product-model',
tags: 'tag_model',
},
'subspace-product-model': {
itemModels: true,
},
'space-product-model': {
items: true,
tag_model: {
tag_model: true,
product: true,
},
};

View File

@ -113,7 +113,8 @@ export class SpaceModelService {
pageable.where = {
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);