mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
57 lines
1.2 KiB
TypeScript
Executable File
57 lines
1.2 KiB
TypeScript
Executable File
import { Column, Entity } from 'typeorm';
|
|
import BaseModel from './BaseModel';
|
|
|
|
import User from './User';
|
|
import Project from './Project';
|
|
import StatusPage from './StatusPage';
|
|
import Monitor from './Monitor';
|
|
import AlertType from '../Types/Alerts/AlertType';
|
|
import HTTPMethod from '../Types/API/HTTPMethod';
|
|
|
|
@Entity({
|
|
name: 'UserAlerts',
|
|
})
|
|
export default class Model extends BaseModel {
|
|
@Column()
|
|
public monitor?: Monitor;
|
|
|
|
@Column()
|
|
public project?: Project;
|
|
|
|
@Column()
|
|
public statusPage?: StatusPage;
|
|
|
|
@Column()
|
|
public alertType?: AlertType;
|
|
|
|
@Column()
|
|
public contactEmail?: string = undefined;
|
|
|
|
@Column()
|
|
public contactPhone?: string = undefined;
|
|
|
|
@Column()
|
|
public countryCode?: string = undefined;
|
|
|
|
@Column()
|
|
public contactWebhook?: string = undefined;
|
|
|
|
@Column()
|
|
public webhookMethod?: HTTPMethod;
|
|
|
|
@Column()
|
|
public incidentNotification?: boolean = undefined;
|
|
|
|
@Column()
|
|
public announcementNotification?: boolean = undefined;
|
|
|
|
@Column()
|
|
public scheduledEventNotification?: boolean = undefined;
|
|
|
|
@Column()
|
|
public subscribed?: boolean = undefined;
|
|
|
|
@Column()
|
|
public deletedByUser?: User;
|
|
}
|