This commit is contained in:
2025-10-02 13:10:53 +07:00
3 changed files with 60 additions and 0 deletions

58
src/entity/gps_devices.ts Normal file
View File

@ -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;
}

View File

@ -11,3 +11,4 @@ export * from "./schema/brilink";
export * from "./schema/eform";
export * from "./schema/compliance";
export * from "./schema/trx";
export * from "./schema/gps";

1
src/schema/gps.ts Normal file
View File

@ -0,0 +1 @@
export * from "../entity/gps_devices";