kaori 4 лет назад
Родитель
Сommit
017c2fb40c
1 измененных файлов с 7 добавлено и 8 удалено
  1. 7 8
      packages/app/src/interfaces/in-app-notification.ts

+ 7 - 8
packages/app/src/interfaces/in-app-notification.ts

@@ -2,23 +2,22 @@ import { Types } from 'mongoose';
 import { IUser } from './user';
 import { IPage } from './page';
 
+export enum InAppNotificationStatuses {
+  STATUS_UNREAD = 'UNREAD',
+  STATUS_UNOPENED = 'UNOPENED',
+  STATUS_OPENED = 'OPENED',
+}
+
 export interface IInAppNotification {
   user: IUser
   targetModel: 'Page'
   target: IPage
   action: 'COMMENT' | 'LIKE'
-  status: string
+  status: InAppNotificationStatuses
   actionUsers: IUser[]
   createdAt: Date
 }
 
-export enum InAppNotificationStatuses {
-  STATUS_UNREAD = 'UNREAD',
-  STATUS_UNOPENED = 'UNOPENED',
-  STATUS_OPENED = 'OPENED',
-}
-
-
 /*
 * Note:
 * Need to use mongoose PaginateResult as a type after upgrading mongoose v6.0.0.