fix(notif): make new column enum for priority
This commit is contained in:
@ -9,6 +9,7 @@ import {
|
||||
} from "typeorm";
|
||||
|
||||
import { User } from "./users";
|
||||
import { NotificationPriority } from "../types/notification_priority";
|
||||
|
||||
@Index(["sender", "recipient"])
|
||||
@Entity("notifications")
|
||||
@ -79,7 +80,7 @@ export class Notification {
|
||||
length: 10,
|
||||
nullable: true,
|
||||
})
|
||||
priority: string | null;
|
||||
priority: NotificationPriority | null;
|
||||
|
||||
@Column({
|
||||
type: "text",
|
||||
|
||||
@ -71,3 +71,4 @@ export * from "../types/email";
|
||||
export * from "../types/telegram";
|
||||
export * from "../types/specialist_form";
|
||||
export * from "../types/diagnosis_type";
|
||||
export * from "../types/notification_priority";
|
||||
|
||||
7
src/types/notification_priority.ts
Normal file
7
src/types/notification_priority.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Priority for notifications.
|
||||
*/
|
||||
export enum NotificationPriority {
|
||||
NORMAL = "normal",
|
||||
HIGH = "high",
|
||||
}
|
||||
Reference in New Issue
Block a user