Add applicationId to syncableEntity and fix syncApp deletion (#15170)
## Context - All flatEntity should extend SyncableEntity - SyncableEntity should now have applicationId and application relation - Fix syncApp deletion, should now properly use migration v2 to delete syncable entities
This commit is contained in:
+3
-4
@@ -1,5 +1,6 @@
|
||||
import { type Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { type FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||
import { type FlatEntityFrom } from 'src/engine/metadata-modules/flat-entity/types/flat-entity.type';
|
||||
import { type ViewGroupEntity } from 'src/engine/metadata-modules/view-group/entities/view-group.entity';
|
||||
import { type ViewEntity } from 'src/engine/metadata-modules/view/entities/view.entity';
|
||||
import { type ExtractRecordTypeOrmRelationProperties } from 'src/engine/workspace-manager/workspace-migration-v2/types/extract-record-typeorm-relation-properties.type';
|
||||
@@ -10,9 +11,7 @@ export type ViewGroupEntityRelationProperties =
|
||||
FieldMetadataEntity | ViewEntity | Workspace
|
||||
>;
|
||||
|
||||
export type FlatViewGroup = Omit<
|
||||
export type FlatViewGroup = FlatEntityFrom<
|
||||
ViewGroupEntity,
|
||||
ViewGroupEntityRelationProperties
|
||||
> & {
|
||||
universalIdentifier: string;
|
||||
};
|
||||
>;
|
||||
|
||||
+3
-1
@@ -28,9 +28,11 @@ export const fromCreateViewGroupInputToFlatViewGroupToCreate = ({
|
||||
createdAt: createdAt,
|
||||
updatedAt: createdAt,
|
||||
deletedAt: null,
|
||||
universalIdentifier: viewGroupId,
|
||||
universalIdentifier:
|
||||
createViewGroupInput.universalIdentifier ?? viewGroupId,
|
||||
isVisible: createViewGroupInput.isVisible ?? true,
|
||||
fieldValue: createViewGroupInput.fieldValue,
|
||||
position: createViewGroupInput.position ?? 0,
|
||||
applicationId: createViewGroupInput.applicationId ?? null,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user