fix(notif): make new column enum for priority

This commit is contained in:
avicenan
2026-06-09 15:49:52 +09:00
parent 97516b65a0
commit 98be255203
3 changed files with 10 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import {
} from "typeorm"; } from "typeorm";
import { User } from "./users"; import { User } from "./users";
import { NotificationPriority } from "../types/notification_priority";
@Index(["sender", "recipient"]) @Index(["sender", "recipient"])
@Entity("notifications") @Entity("notifications")
@ -79,7 +80,7 @@ export class Notification {
length: 10, length: 10,
nullable: true, nullable: true,
}) })
priority: string | null; priority: NotificationPriority | null;
@Column({ @Column({
type: "text", type: "text",

View File

@ -71,3 +71,4 @@ export * from "../types/email";
export * from "../types/telegram"; export * from "../types/telegram";
export * from "../types/specialist_form"; export * from "../types/specialist_form";
export * from "../types/diagnosis_type"; export * from "../types/diagnosis_type";
export * from "../types/notification_priority";

View File

@ -0,0 +1,7 @@
/**
* Priority for notifications.
*/
export enum NotificationPriority {
NORMAL = "normal",
HIGH = "high",
}