Skip to content

Commit

Permalink
Create Notification model
Browse files Browse the repository at this point in the history
create model for a site notification
  • Loading branch information
DJensen94 committed Apr 5, 2024
1 parent 7fa87cb commit 7a7bbc9
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions backend/src/models/notification.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {
Entity,

Check failure on line 2 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
Column,

Check failure on line 3 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `····` with `··`
PrimaryGeneratedColumn,

Check failure on line 4 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
BaseEntity,

Check failure on line 5 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `····` with `··`
CreateDateColumn,

Check failure on line 6 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
UpdateDateColumn

Check failure on line 7 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `····` with `··`
} from 'typeorm';

Check failure on line 8 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`

Check failure on line 9 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
@Entity()

Check failure on line 10 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
export class Notification extends BaseEntity {

Check failure on line 11 in backend/src/models/notification.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
@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;

}

0 comments on commit 7a7bbc9

Please sign in to comment.