From 44ecb8018c25ebef49f2c3209bdde149b33c541d Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 22 Oct 2024 18:32:27 +0530 Subject: [PATCH] feat: schedule config interface --- server/src/models/Robot.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/src/models/Robot.ts b/server/src/models/Robot.ts index 79afed38..c19ed19a 100644 --- a/server/src/models/Robot.ts +++ b/server/src/models/Robot.ts @@ -27,6 +27,19 @@ interface RobotAttributes { google_refresh_token?: string | null; } +interface ScheduleConfig { + enabled: boolean; + runEvery: number; + runEveryUnit: 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS'; + startFrom: 'SUNDAY' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY'; + atTimeStart?: string; + atTimeEnd?: string; + timezone: string; + lastRunAt?: Date; + nextRunAt?: Date; + cronExpression?: string; +} + interface RobotCreationAttributes extends Optional { } class Robot extends Model implements RobotAttributes {