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,58 @@
import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
export enum AssetGeometryType {
POINT = 'POINT',
LINESTRING = 'LINESTRING',
POLYGON = 'POLYGON',
}
export enum AssetGeometrySource {
WEB = 'WEB',
ANDROID = 'ANDROID',
IMPORT = 'IMPORT',
SURVEY = 'SURVEY',
}
@Entity({ name: 'asset_geometries' })
@Index('idx_asset_geometries_geometry', ['geometry'], { spatial: true })
@Index('idx_asset_geometries_type', ['geometryType'])
export class AssetGeometry {
@PrimaryColumn({ name: 'asset_id', type: 'uuid' })
assetId!: string;
@Column({
type: 'geometry',
spatialFeatureType: 'Geometry',
srid: 4326,
})
geometry!: { type: AssetGeometryType; coordinates: unknown };
@Column({ name: 'geometry_type', type: 'varchar', length: 20 })
geometryType!: AssetGeometryType;
@Column({
type: 'enum',
enum: AssetGeometrySource,
enumName: 'asset_geometry_source',
default: AssetGeometrySource.WEB,
})
source!: AssetGeometrySource;
@Column({ name: 'accuracy_m', type: 'numeric', precision: 12, scale: 3, nullable: true })
accuracyM!: string | null;
@Column({ name: 'captured_at', type: 'timestamptz', nullable: true })
capturedAt!: Date | null;
@Column({ name: 'device_label', type: 'varchar', length: 255, nullable: true })
deviceLabel!: string | null;
@Column({ name: 'created_at', type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' })
createdAt!: Date;
@Column({ name: 'updated_at', type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' })
updatedAt!: Date;
@Column({ name: 'updated_by', type: 'uuid', nullable: true })
updatedBy!: string | null;
}