From 7a7bbc92dabb4f52ffe542d72f6833a679f2cb40 Mon Sep 17 00:00:00 2001 From: DJensen94 <79864006+DJensen94@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:27:10 -0400 Subject: [PATCH] Create Notification model create model for a site notification --- backend/src/models/notification.ts | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 backend/src/models/notification.ts diff --git a/backend/src/models/notification.ts b/backend/src/models/notification.ts new file mode 100644 index 00000000..184ee6b9 --- /dev/null +++ b/backend/src/models/notification.ts @@ -0,0 +1,51 @@ +import { + Entity, + Column, + PrimaryGeneratedColumn, + BaseEntity, + CreateDateColumn, + UpdateDateColumn + } from 'typeorm'; + + @Entity() + export class Notification extends BaseEntity { + @PrimaryGeneratedColumn('uuid') + id: string; + + @CreateDateColumn() + createdAt: Date; + + @UpdateDateColumn() + updatedAt: Date; + + @Column({ + type: 'timestamp', + nullable: true + }) + startDatetime: Date | null; + + @Column({ + type: 'timestamp', + nullable: true + }) + endDatetime: Date | null; + + @Column({ + nullable: true, + type: 'varchar' + }) + maintenanceType: string | null; + + @Column({ + nullable: true, + type: 'varchar' + }) + status: string | null; + + @Column({ + type: 'timestamp', + nullable: true + }) + updatedBy: Date | null; + + } \ No newline at end of file