oneuptime/Common/Models/Subscriber.ts

57 lines
1.2 KiB
TypeScript
Raw Normal View History

2022-04-30 10:57:20 +00:00
import { Column, Entity } from 'typeorm';
2022-04-26 20:34:05 +00:00
import BaseModel from './BaseModel';
2022-05-01 12:41:55 +00:00
2022-04-27 08:22:16 +00:00
import User from './User';
import Project from './Project';
2022-04-30 10:39:37 +00:00
import StatusPage from './StatusPage';
import Monitor from './Monitor';
import AlertType from '../Types/Alerts/AlertType';
import HTTPMethod from '../Types/API/HTTPMethod';
2022-04-27 19:38:55 +00:00
@Entity({
2022-04-30 10:57:20 +00:00
name: 'UserAlerts',
2022-04-27 19:38:55 +00:00
})
2022-04-30 10:39:37 +00:00
export default class Model extends BaseModel {
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public monitor?: Monitor;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public project?: Project;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public statusPage?: StatusPage;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public alertType?: AlertType;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public contactEmail?: string = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public contactPhone?: string = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public countryCode?: string = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public contactWebhook?: string = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public webhookMethod?: HTTPMethod;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public incidentNotification?: boolean = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public announcementNotification?: boolean = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public scheduledEventNotification?: boolean = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public subscribed?: boolean = undefined;
2022-04-30 10:39:37 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public deletedByUser?: User;
2022-04-26 20:34:05 +00:00
}