feat: soft delete (#6576)
Implement soft delete on standards and custom objects. This is a temporary solution, when we drop `pg_graphql` we should rely on the `softDelete` functions of TypeORM. --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -40,6 +40,7 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta
|
||||
description: 'A company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
labelIdentifierStandardId: COMPANY_STANDARD_FIELD_IDS.name,
|
||||
softDelete: true,
|
||||
})
|
||||
export class CompanyWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
|
||||
@ -26,6 +26,7 @@ import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-ob
|
||||
labelPlural: 'Note Targets',
|
||||
description: 'A note target',
|
||||
icon: 'IconCheckbox',
|
||||
softDelete: true,
|
||||
})
|
||||
@WorkspaceIsSystem()
|
||||
export class NoteTargetWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
|
||||
@ -30,6 +30,7 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
|
||||
description: 'A note',
|
||||
icon: 'IconNotes',
|
||||
labelIdentifierStandardId: NOTE_STANDARD_FIELD_IDS.title,
|
||||
softDelete: true,
|
||||
})
|
||||
export class NoteWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
|
||||
@ -39,6 +39,7 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
|
||||
description: 'An opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
labelIdentifierStandardId: OPPORTUNITY_STANDARD_FIELD_IDS.name,
|
||||
softDelete: true,
|
||||
})
|
||||
@WorkspaceIsNotAuditLogged()
|
||||
export class OpportunityWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
|
||||
@ -40,6 +40,7 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
|
||||
icon: 'IconUser',
|
||||
labelIdentifierStandardId: PERSON_STANDARD_FIELD_IDS.name,
|
||||
imageIdentifierStandardId: PERSON_STANDARD_FIELD_IDS.avatarUrl,
|
||||
softDelete: true,
|
||||
})
|
||||
export class PersonWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
|
||||
@ -26,6 +26,7 @@ import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-ob
|
||||
labelPlural: 'Task Targets',
|
||||
description: 'An task target',
|
||||
icon: 'IconCheckbox',
|
||||
softDelete: true,
|
||||
})
|
||||
@WorkspaceIsSystem()
|
||||
export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
|
||||
@ -32,6 +32,7 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta
|
||||
description: 'A task',
|
||||
icon: 'IconCheckbox',
|
||||
labelIdentifierStandardId: TASK_STANDARD_FIELD_IDS.title,
|
||||
softDelete: true,
|
||||
})
|
||||
export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
@WorkspaceField({
|
||||
|
||||
Reference in New Issue
Block a user