oneuptime/Common/Models/SmsProvider.ts

34 lines
630 B
TypeScript
Raw Normal View History

2022-04-29 19:54:29 +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-29 19:52:23 +00:00
import { JSONObject } from '../Types/JSON';
2022-04-26 20:24:24 +00:00
2022-04-29 19:52:23 +00:00
export enum SMSProviderType {
2022-04-29 19:54:29 +00:00
Twilio = 'twilio',
2022-04-26 20:34:05 +00:00
}
2022-04-29 19:52:23 +00:00
@Entity({
2022-04-29 19:54:29 +00:00
name: 'UserAlerts',
2022-04-29 19:52:23 +00:00
})
export default class Model extends BaseModel {
2022-04-29 19:54:29 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public project?: Project;
2022-04-29 19:52:23 +00:00
2022-04-29 19:54:29 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public enabled?: boolean = undefined;
2022-04-26 20:34:05 +00:00
2022-04-29 19:54:29 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public provider?: SMSProviderType;
2022-04-26 20:24:24 +00:00
2022-04-29 19:54:29 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public credentials?: JSONObject;
2022-04-26 20:34:05 +00:00
2022-04-29 19:54:29 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public deletedByUser?: User;
2022-04-26 20:34:05 +00:00
2022-04-29 19:54:29 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public createdByUser?: User;
2022-04-29 19:54:29 +00:00
}