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,60 @@
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
export enum AssetVersionChangeType {
BASELINE = 'BASELINE',
CREATED = 'CREATED',
UPDATED = 'UPDATED',
CONTEXT_CHANGED = 'CONTEXT_CHANGED',
STATUS_CHANGED = 'STATUS_CHANGED',
OPERATIONAL_STATUS_CHANGED = 'OPERATIONAL_STATUS_CHANGED',
REGISTRY_UPDATED = 'REGISTRY_UPDATED',
GEOMETRY_UPDATED = 'GEOMETRY_UPDATED',
GEOMETRY_REMOVED = 'GEOMETRY_REMOVED',
MEDIA_UPLOADED = 'MEDIA_UPLOADED',
MEDIA_UPDATED = 'MEDIA_UPDATED',
MEDIA_REMOVED = 'MEDIA_REMOVED',
PROVENANCE_BASELINE = 'PROVENANCE_BASELINE',
PROVENANCE_UPDATED = 'PROVENANCE_UPDATED',
PROVENANCE_VERIFIED = 'PROVENANCE_VERIFIED',
}
@Entity({ name: 'asset_versions' })
@Index('idx_asset_versions_asset_number', ['assetId', 'versionNumber'], {
unique: true,
})
@Index('idx_asset_versions_occurred_at', ['occurredAt'])
@Index('idx_asset_versions_change_type', ['changeType'])
export class AssetVersion {
@PrimaryGeneratedColumn('uuid')
id!: string;
@Column({ name: 'asset_id', type: 'uuid' })
assetId!: string;
@Column({ name: 'version_number', type: 'integer' })
versionNumber!: number;
@Column({ name: 'change_type', type: 'varchar', length: 32 })
changeType!: AssetVersionChangeType;
@Column({ name: 'changed_fields', type: 'text', array: true, default: () => "'{}'" })
changedFields!: string[];
@Column({ type: 'jsonb' })
snapshot!: Record<string, unknown>;
@Column({ name: 'occurred_at', type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' })
occurredAt!: Date;
@Column({ name: 'actor_user_id', type: 'uuid', nullable: true })
actorUserId!: string | null;
@Column({ name: 'actor_username', type: 'varchar', length: 80, nullable: true })
actorUsername!: string | null;
@Column({ type: 'varchar', length: 32 })
source!: string;
@Column({ name: 'request_id', type: 'varchar', length: 128, nullable: true })
requestId!: string | null;
}