relation Schedules to Order

This commit is contained in:
unclebonn
2024-11-28 15:27:41 +07:00
parent a6788345ce
commit 19a19b00c4

View File

@@ -44,6 +44,10 @@ export class ScheduleSchema extends PothosSchema {
description: 'The ID of the order the schedule belongs to.', description: 'The ID of the order the schedule belongs to.',
nullable: true, nullable: true,
}), }),
order: t.relation('Order', {
description: 'The order that belongs to orderId.',
nullable: true,
}),
scheduleStart: t.expose('scheduleStart', { scheduleStart: t.expose('scheduleStart', {
type: 'DateTime', type: 'DateTime',
nullable: false, nullable: false,