mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 14:38:12 +00:00
36 lines
768 B
TypeScript
36 lines
768 B
TypeScript
import { BaseEntity } from "@edr/api-common";
|
|
import { Column, Entity } from "typeorm";
|
|
|
|
@Entity({ name: "stations" })
|
|
export class Station extends BaseEntity {
|
|
@Column({ name: "code", type: "varchar", length: 16, unique: true })
|
|
code!: string;
|
|
|
|
@Column({ name: "name", type: "varchar", length: 128 })
|
|
name!: string;
|
|
|
|
@Column({ name: "city", type: "varchar", length: 128 })
|
|
city!: string;
|
|
|
|
@Column({ name: "country", type: "varchar", length: 64 })
|
|
country!: string;
|
|
|
|
@Column({
|
|
name: "latitude",
|
|
type: "numeric",
|
|
precision: 9,
|
|
scale: 6,
|
|
nullable: true,
|
|
})
|
|
latitude?: number | null;
|
|
|
|
@Column({
|
|
name: "longitude",
|
|
type: "numeric",
|
|
precision: 9,
|
|
scale: 6,
|
|
nullable: true,
|
|
})
|
|
longitude?: number | null;
|
|
}
|