oneuptime/Common/Models/Subscriber.ts
Simon Larsen 53815189dc
fix lint.
2022-05-19 20:41:12 +01:00

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;
}