merge change from db

This commit is contained in:
2024-10-25 14:49:16 +07:00
parent 2872ac69ef
commit 7e25e8d96b
26 changed files with 147 additions and 94 deletions

View File

@@ -23,13 +23,11 @@ export class ScheduleSchema extends PothosSchema {
return this.builder.prismaObject('Schedule', {
description: 'A schedule in the system.',
fields: (t) => ({
id: t.exposeID('id'),
serviceId: t.exposeID('serviceId', {
description: 'The ID of the service the schedule belongs to.',
nullable: false,
id: t.exposeID('id', {
description: 'The ID of the schedule.',
}),
service: t.relation('service', {
description: 'The service the schedule belongs to.',
managedServiceId: t.exposeID('managedServiceId', {
description: 'The ID of the managed service the schedule belongs to.',
nullable: false,
}),
scheduleStart: t.expose('ScheduleStart', {
@@ -40,11 +38,17 @@ export class ScheduleSchema extends PothosSchema {
type: 'DateTime',
nullable: false,
}),
dates: t.relation('dates'),
dates: t.relation('dates', {
description: 'The dates of the schedule.',
}),
status: t.expose('status', {
type: ScheduleStatus,
nullable: false,
}),
managedService: t.relation('ManagedService', {
description: 'The managed service the schedule belongs to.',
nullable: false,
}),
}),
});
}