diff --git a/src/entity/gps_devices.ts b/src/entity/gps_devices.ts new file mode 100644 index 0000000..8ad1ccc --- /dev/null +++ b/src/entity/gps_devices.ts @@ -0,0 +1,58 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; + +@Entity("gps_devices", { schema: "gps" }) +export class GpsDevice { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: false, + length: 256, + }) + brand: string; + + @Column({ + nullable: false, + length: 256, + }) + model: string; + + @Column({ + nullable: false, + length: 4096, + }) + imei: string; + + @Column({ + nullable: false, + length: 256, + }) + simcard: string; + + @Column({ + nullable: true, + length: 4096, + }) + notes: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ type: "varchar", length: 255 }) + created_by: string; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; + + @Column({ type: "varchar", length: 255, nullable: true }) + updated_by: string; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; + + @Column({ type: "varchar", length: 255, nullable: true }) + deleted_by: string; +} diff --git a/src/index.ts b/src/index.ts index 8784c42..846f3ff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,3 +11,4 @@ export * from "./schema/brilink"; export * from "./schema/eform"; export * from "./schema/compliance"; export * from "./schema/trx"; +export * from "./schema/gps"; diff --git a/src/schema/gps.ts b/src/schema/gps.ts new file mode 100644 index 0000000..7fc7429 --- /dev/null +++ b/src/schema/gps.ts @@ -0,0 +1 @@ +export * from "../entity/gps_devices";