oneuptime/Common/Models/IncidentSMSAction.ts
Simon Larsen f0c0715f36
fix
2022-04-29 20:52:23 +01:00

58 lines
769 B
TypeScript
Executable File

import { Column, Entity, Index } from 'typeorm';
import BaseModel from './BaseModel';
import User from './User';
import Project from './Project';
@Entity({
name: "UserAlerts"
})
export default class Model extends BaseModel{
@Column()
incident: { type: string, ref: 'Incident', index!: true }; //Which project this incident belongs to.
@Column()
user!: User; // Which User will perfom this action.
@Column()
number!: string;
@Column()
name!: string;
@Column()
resolved!: boolean;
@Column()
acknowledged!: boolean;
@Column()
createdAt!: {
@Column()
type!: Date;
@Column()
default!: Date.now;
@Column()
expires!: 86400;
};
@Column()
deletedByUser!: User;
}