oneuptime/Common/Models/AutomatedScript.ts

34 lines
625 B
TypeScript
Raw Normal View History

2022-04-30 10:57:20 +00:00
import { Column, Entity } from 'typeorm';
2022-04-27 19:38:55 +00:00
import BaseModel from './BaseModel';
2022-05-01 12:41:55 +00:00
2022-04-27 19:38:55 +00:00
import User from './User';
import Project from './Project';
export enum ScriptType {
2022-04-30 10:57:20 +00:00
JavaScript = 'JavaScript',
Bash = 'Bash',
2022-04-27 19:38:55 +00:00
}
@Entity({
2022-04-30 10:57:20 +00:00
name: 'AutomatedScripts',
2022-04-27 19:38:55 +00:00
})
2022-04-29 19:52:23 +00:00
export default class AutomatedScript extends BaseModel {
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public name?: string = undefined;
2022-04-27 19:38:55 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public script?: string = undefined;
2022-04-27 19:38:55 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public scriptType?: ScriptType;
2022-04-27 19:38:55 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-19 19:41:12 +00:00
public slug?: string = undefined;
2022-04-27 19:38:55 +00:00
2022-04-30 10:57:20 +00:00
@Column()
2022-05-18 20:49:52 +00:00
public project?: Project;
2022-04-27 19: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-29 21:38:55 +00:00
}