19 lines
512 B
TypeScript
19 lines
512 B
TypeScript
import { Document } from "mongoose";
|
|
import { IUser } from "../user/user.interface";
|
|
|
|
export enum ISeverity {
|
|
INFO = 0,
|
|
SUCCESS = 1,
|
|
WARN = 2,
|
|
ERROR = 3
|
|
}
|
|
|
|
export type NotificationType = 'beat' | 'phone_alive' | 'phone_dead' | 'phone_register' | 'panic' | 'test';
|
|
export type PublicNotificationType = 'shutdown' | 'restart' | 'warning' | 'error' | 'info';
|
|
|
|
export interface INotification extends Document {
|
|
type: NotificationType;
|
|
severity: ISeverity;
|
|
message: any;
|
|
user: IUser;
|
|
} |