refactor source code

This commit is contained in:
2024-10-29 17:42:54 +07:00
parent 3b23d9e0b7
commit 152bb50da8
83 changed files with 8473 additions and 7577 deletions

View File

@@ -1,13 +1,13 @@
import { Inject, Injectable } from '@nestjs/common';
import { Inject, Injectable } from '@nestjs/common'
import {
Pothos,
PothosRef,
PothosSchema,
SchemaBuilderToken,
} from '@smatch-corp/nestjs-pothos';
import { Builder } from '../Graphql/graphql.builder';
import { PrismaService } from '../Prisma/prisma.service';
import { ScheduleStatus } from '@prisma/client';
} from '@smatch-corp/nestjs-pothos'
import { Builder } from '../Graphql/graphql.builder'
import { PrismaService } from '../Prisma/prisma.service'
import { ScheduleStatus } from '@prisma/client'
@Injectable()
export class ScheduleSchema extends PothosSchema {
@@ -15,7 +15,7 @@ export class ScheduleSchema extends PothosSchema {
@Inject(SchemaBuilderToken) private readonly builder: Builder,
private readonly prisma: PrismaService,
) {
super();
super()
}
@PothosRef()
@@ -50,7 +50,7 @@ export class ScheduleSchema extends PothosSchema {
nullable: false,
}),
}),
});
})
}
@PothosRef()
@@ -76,7 +76,7 @@ export class ScheduleSchema extends PothosSchema {
description: 'The schedule the schedule date belongs to.',
}),
}),
});
})
}
@Pothos()
@@ -90,7 +90,7 @@ export class ScheduleSchema extends PothosSchema {
return await this.prisma.schedule.findUnique({
...query,
where: args.where,
});
})
},
}),
@@ -106,9 +106,9 @@ export class ScheduleSchema extends PothosSchema {
take: args.take ?? undefined,
orderBy: args.orderBy ?? undefined,
where: args.filter ?? undefined,
});
})
},
}),
}));
}))
}
}