Files
edr-platform/apps/edr-freight-api/src/modules/tracking/entities/tracking-event.entity.ts
2026-05-23 10:00:40 +03:00

22 lines
684 B
TypeScript

import { BaseEntity } from "@edr/api-common";
import { Freight } from "@edr/types";
import { Column, Entity } from "typeorm";
@Entity({schema:"freight", name: "tracking_events" })
export class TrackingEvent extends BaseEntity {
@Column({ name: "consignment_id", type: "uuid" })
consignmentId!: string;
@Column({ name: "location", type: "varchar", length: 256 })
location!: string;
@Column({ name: "status", type: "enum", enum: Freight.ConsignmentStatus })
status!: Freight.ConsignmentStatus;
@Column({ name: "occurred_at", type: "timestamptz" })
occurredAt!: Date;
@Column({ name: "description", type: "text", nullable: true })
description?: string | null;
}