mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +00:00
chore: fmt
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
import { BaseEntity } from '@edr/api-common';
|
||||
import { Freight } from '@edr/types';
|
||||
import { Column, Entity } from 'typeorm';
|
||||
import { BaseEntity } from "@edr/api-common";
|
||||
import { Freight } from "@edr/types";
|
||||
import { Column, Entity } from "typeorm";
|
||||
|
||||
@Entity({ name: 'trains' })
|
||||
@Entity({ name: "trains" })
|
||||
export class Train extends BaseEntity {
|
||||
@Column({ name: 'code', type: 'varchar', length: 32, unique: true })
|
||||
@Column({ name: "code", type: "varchar", length: 32, unique: true })
|
||||
code!: string;
|
||||
|
||||
@Column({ name: 'capacity_tons', type: 'numeric', precision: 10, scale: 2 })
|
||||
@Column({ name: "capacity_tons", type: "numeric", precision: 10, scale: 2 })
|
||||
capacityTons!: number;
|
||||
|
||||
@Column({
|
||||
name: 'status',
|
||||
type: 'enum',
|
||||
name: "status",
|
||||
type: "enum",
|
||||
enum: Freight.TrainStatus,
|
||||
default: Freight.TrainStatus.Available,
|
||||
})
|
||||
status!: Freight.TrainStatus;
|
||||
|
||||
@Column({ name: 'notes', type: 'text', nullable: true })
|
||||
@Column({ name: "notes", type: "text", nullable: true })
|
||||
notes?: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user