From 93c16bfcf593e0e5797d8ae98b6cb94b375722bd Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Tue, 7 Jul 2026 10:52:32 +0700 Subject: [PATCH] update site points controller and route to add new endpoint for all data --- src/entity/site_points.ts | 55 +++++++++++++++++++++++++++++++++++++++ src/schema/public.ts | 1 + 2 files changed, 56 insertions(+) create mode 100644 src/entity/site_points.ts diff --git a/src/entity/site_points.ts b/src/entity/site_points.ts new file mode 100644 index 0000000..b4e066f --- /dev/null +++ b/src/entity/site_points.ts @@ -0,0 +1,55 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm'; + +@Entity('site_points') +export class SitePoints { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ + nullable: true, + type: "text" + }) + cell: string; + + @Column({ + nullable: true, + type: "text" + }) + sector: string; + + @Column({ + nullable: true, + type: "text" + }) + site: string; + + @Column({ + nullable: true, + type: "double precision", + }) + lat: number; + + @Column({ + nullable: true, + type: "double precision", + }) + lng: number; + + @Column({ + nullable: true, + type: "text" + }) + location: string; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; +} \ No newline at end of file diff --git a/src/schema/public.ts b/src/schema/public.ts index 0c44074..16618b0 100644 --- a/src/schema/public.ts +++ b/src/schema/public.ts @@ -2,5 +2,6 @@ export * from "../entity/user_activity"; export * from "../entity/user_refresh_token"; export * from "../entity/users"; export * from "../entity/users_roles"; +export * from "../entity/site_points"; export * from "../types/action";