2022-04-27 19:38:55 +00:00
|
|
|
import { Column, Entity, Index } from 'typeorm';
|
|
|
|
import BaseModel from './BaseModel';
|
|
|
|
import User from './User';
|
|
|
|
import Project from './Project';
|
|
|
|
import { IncidentState }, Incident from './Incident';
|
|
|
|
import Escalation from './Escalation';
|
2022-04-29 19:52:23 +00:00
|
|
|
import Schedule from './OnCallDutySchedule';
|
|
|
|
import Incident from './Incident';
|
2022-04-27 19:38:55 +00:00
|
|
|
|
|
|
|
@Entity({
|
|
|
|
name: "UserAlerts"
|
|
|
|
})
|
2022-04-29 19:52:23 +00:00
|
|
|
|
2022-04-27 19:38:55 +00:00
|
|
|
export default class UserAlerts extends BaseModel {
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
nullable: false,
|
|
|
|
})
|
|
|
|
project!: Project;
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
nullable: false,
|
|
|
|
})
|
|
|
|
user!: User;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
alertType!: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
alertStatus!: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
eventType!: IncidentState
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
incident!: Incident;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
onCallScheduleStatus!: OnCallSchedule;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
schedule!: Schedule;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
escalation!: Escalation;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
error!: boolean;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
errorMessage!: string;
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
alertProgress!: string
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
deletedByUser!: User;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|