1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/common/entities/TaskDTO.ts

29 lines
481 B
TypeScript
Raw Normal View History

export interface TaskType {
name: string;
parameter: any;
}
export enum TaskTriggerType {
scheduled, periodic
}
export interface TaskTrigger {
type: TaskTriggerType;
}
export interface ScheduledTaskTrigger extends TaskTrigger {
type: TaskTriggerType.scheduled;
time: number;
}
export interface PeriodicTaskTrigger extends TaskTrigger {
type: TaskTriggerType.periodic;
}
export interface TaskDTO {
priority: number;
type: TaskType;
trigger: TaskTrigger;
}