mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
Refactor/space management (#404)
* refactor: reducing used queries on get communities (#385) * refactor: fix create space logic (#394) * Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity * refactor: fix create space logic * device model updated to include the fixes and final columns * updated space models to include suggested fixes, update final logic and column names * task: removing old references of the old tag-product relation * task: remove old use of tags * task: remove old tag & tag model usage * refactor: delete space * task: remove unused functions * fix lint rule
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
export * from './update-subspace.interface';
|
||||
export * from './modify-subspace.interface';
|
||||
export * from './single-subspace.interface';
|
||||
export * from './space-product-allocation.interface';
|
||||
export * from './update-subspace.interface';
|
||||
|
@ -1,24 +0,0 @@
|
||||
import { SubspaceModelEntity, TagModel } from '@app/common/modules/space-model';
|
||||
|
||||
export interface ModifyspaceModelPayload {
|
||||
modifiedSubspaceModels?: ModifySubspaceModelPayload;
|
||||
modifiedTags?: ModifiedTagsModelPayload;
|
||||
}
|
||||
|
||||
export interface ModifySubspaceModelPayload {
|
||||
addedSubspaceModels?: SubspaceModelEntity[];
|
||||
updatedSubspaceModels?: UpdatedSubspaceModelPayload[];
|
||||
deletedSubspaceModels?: string[];
|
||||
}
|
||||
|
||||
export interface UpdatedSubspaceModelPayload {
|
||||
subspaceName?: string;
|
||||
modifiedTags?: ModifiedTagsModelPayload;
|
||||
subspaceModelUuid: string;
|
||||
}
|
||||
|
||||
export interface ModifiedTagsModelPayload {
|
||||
added?: TagModel[];
|
||||
updated?: TagModel[];
|
||||
deleted?: string[];
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
import { ModifyAction } from '@app/common/constants/modify-action.enum';
|
||||
import {
|
||||
SpaceModelProductAllocationEntity,
|
||||
SubspaceModelEntity,
|
||||
} from '@app/common/modules/space-model';
|
||||
import { ModifyTagModelDto } from '../dtos';
|
||||
import { ModifyAction } from '@app/common/constants/modify-action.enum';
|
||||
import { NewTagEntity } from '@app/common/modules/tag';
|
||||
import { IUpdatedAllocations } from './subspace-product-allocation-update-result.interface';
|
||||
import { ModifyTagDto } from 'src/space/dtos/tag/modify-tag.dto';
|
||||
|
||||
export interface IRelocatedAllocation {
|
||||
allocation: SpaceModelProductAllocationEntity;
|
||||
@ -14,7 +14,7 @@ export interface IRelocatedAllocation {
|
||||
export interface ISingleSubspaceModel {
|
||||
subspaceModel: SubspaceModelEntity;
|
||||
action: ModifyAction;
|
||||
tags?: ModifyTagModelDto[];
|
||||
tags?: ModifyTagDto[];
|
||||
relocatedAllocations?: IRelocatedAllocation[];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user