chore: import DH V2 D5.6.4 production baseline

This commit is contained in:
DH V2
2026-09-05 10:12:35 -03:00
commit 82213e72f5
757 changed files with 84218 additions and 0 deletions
@@ -0,0 +1,56 @@
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
import { TimestampedEntity } from './timestamped.entity';
export enum FindingCatalogProposalStatus {
PENDING = 'PENDING',
MATCHED = 'MATCHED',
REJECTED = 'REJECTED',
}
@Entity({ name: 'finding_catalog_proposals' })
@Index('uq_finding_catalog_proposals_finding', ['findingId'], { unique: true })
@Index('idx_finding_catalog_proposals_status', ['status', 'createdAt'])
@Index('idx_finding_catalog_proposals_asset_type', ['assetTypeId', 'status'])
export class FindingCatalogProposal extends TimestampedEntity {
@PrimaryGeneratedColumn('uuid')
id!: string;
@Column({ name: 'finding_id', type: 'uuid' })
findingId!: string;
@Column({ name: 'asset_id', type: 'uuid' })
assetId!: string;
@Column({ name: 'asset_type_id', type: 'uuid' })
assetTypeId!: string;
@Column({ name: 'proposed_title', type: 'varchar', length: 500 })
proposedTitle!: string;
@Column({ name: 'proposed_legal_basis', type: 'text', nullable: true })
proposedLegalBasis!: string | null;
@Column({ name: 'proposed_severity', type: 'smallint', nullable: true })
proposedSeverity!: number | null;
@Column({ type: 'text' })
description!: string;
@Column({ type: 'varchar', length: 20, default: FindingCatalogProposalStatus.PENDING })
status!: FindingCatalogProposalStatus;
@Column({ name: 'resolved_catalog_item_id', type: 'uuid', nullable: true })
resolvedCatalogItemId!: string | null;
@Column({ name: 'office_notes', type: 'text', nullable: true })
officeNotes!: string | null;
@Column({ name: 'reviewed_by', type: 'uuid', nullable: true })
reviewedBy!: string | null;
@Column({ name: 'reviewed_at', type: 'timestamptz', nullable: true })
reviewedAt!: Date | null;
@Column({ name: 'created_by', type: 'uuid', nullable: true })
createdBy!: string | null;
}