diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/schema.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/schema.ts b/lib/schema.ts index 4e5dd69..1bba77d 100644 --- a/lib/schema.ts +++ b/lib/schema.ts @@ -6,15 +6,14 @@ export interface EventDocument<Context> extends Document { status: 'notStarted' | 'running' | 'complete' | 'failed'; error?: string; context: Context; - nextRunAt: Date; - lastRunAt: Date; + nextRunAt?: Date; + lastRunAt?: Date; } const createEventSchema = (contextSchema: Schema) => new Schema({ name: { type: String, - required: true, - unique: true + required: true }, schedule: { type: String, |