feat: add schedule start and end validation in OrderSchema

- Introduced new validation fields for schedule start and end times in the OrderSchema to ensure accurate scheduling.
- This enhancement aims to improve the integrity of scheduling operations by validating the start and end times against the provided schedule data.
This commit is contained in:
2025-01-17 21:34:44 +07:00
parent d36460fc12
commit 5fff0db6d7

View File

@@ -432,6 +432,12 @@ export class OrderSchema extends PothosSchema {
(scheduleDate) => scheduleDate.scheduleId
),
},
start: {
equals: args.data.schedule.connect?.scheduleStart as Date,
},
end: {
equals: args.data.schedule.connect?.scheduleEnd as Date,
},
},
],
},