2026-04-12-1

This commit is contained in:
Hamza-Ayed
2026-04-12 22:35:38 +03:00
parent e3799c422c
commit 5ebd7ea3b1
84 changed files with 532 additions and 5136 deletions
@@ -0,0 +1,23 @@
import { Entity, Column, PrimaryColumn, Index, CreateDateColumn } from 'typeorm';
@Entity('road_speed_profiles')
@Index(['segmentId', 'hourOfDay', 'dayOfWeek'], { unique: true })
export class RoadSpeedProfile {
@PrimaryColumn()
segmentId: string;
@PrimaryColumn()
hourOfDay: number; // 0-23
@PrimaryColumn()
dayOfWeek: number; // 0-6 (0 = Sunday)
@Column('float', { default: 0 })
averageSpeed: number;
@Column('int', { default: 0 })
sampleCount: number;
@CreateDateColumn()
lastUpdated: Date;
}