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-29 21:38:55 +00:00
|
|
|
import Incident from './Incident';
|
|
|
|
import Probe from './Probe';
|
2022-04-27 08:22:16 +00:00
|
|
|
import User from './User';
|
2022-04-29 21:38:55 +00:00
|
|
|
|
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-29 21:38:55 +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 incident?: Incident;
|
2022-04-29 21:38:55 +00:00
|
|
|
|
2022-04-30 10:57:20 +00:00
|
|
|
@Column()
|
2022-05-18 20:49:52 +00:00
|
|
|
public createdByUser?: User; // user
|
2022-04-29 21:38:55 +00:00
|
|
|
|
2022-04-30 10:57:20 +00:00
|
|
|
@Column()
|
2022-05-18 20:49:52 +00:00
|
|
|
public probe?: Probe;
|
2022-04-29 21:38:55 +00:00
|
|
|
|
2022-04-30 10:57:20 +00:00
|
|
|
@Column()
|
2022-05-18 20:49:52 +00:00
|
|
|
public createdByZapier?: boolean = undefined; // Is true when zapier creates incident
|
2022-04-29 21:38:55 +00:00
|
|
|
|
2022-04-30 10:57:20 +00:00
|
|
|
@Column()
|
2022-05-18 20:49:52 +00:00
|
|
|
public createdByApi?: boolean = undefined;
|
2022-04-29 21:38:55 +00:00
|
|
|
|
2022-04-30 10:57:20 +00:00
|
|
|
@Column()
|
2022-05-19 19:41:12 +00:00
|
|
|
public status?: string = undefined;
|
2022-04-29 21:38:55 +00:00
|
|
|
|
2022-04-30 10:57:20 +00:00
|
|
|
@Column()
|
2022-05-19 19:41:12 +00:00
|
|
|
public incidentState?: string = undefined;
|
2022-04-29 21:38:55 +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
|
|
|
}
|