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