Fixing file name casing
This commit is contained in:
9
src/WorkshopOrganization/workshoporganization.module.ts
Normal file
9
src/WorkshopOrganization/workshoporganization.module.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { WorkshopOrganizationSchema } from './workshoporganization.schema';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [WorkshopOrganizationSchema],
|
||||
exports: [WorkshopOrganizationSchema],
|
||||
})
|
||||
export class WorkshopOrganizationModule {}
|
||||
30
src/WorkshopOrganization/workshoporganization.schema.ts
Normal file
30
src/WorkshopOrganization/workshoporganization.schema.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
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';
|
||||
|
||||
@Injectable()
|
||||
export class WorkshopOrganizationSchema extends PothosSchema {
|
||||
constructor(
|
||||
@Inject(SchemaBuilderToken) private readonly builder: Builder,
|
||||
private readonly prisma: PrismaService,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@PothosRef()
|
||||
workshopOrganization() {
|
||||
return this.builder.prismaObject('WorkshopOrganization', {
|
||||
fields: (t) => ({
|
||||
workshopId: t.exposeID('workshopId'),
|
||||
serviceId: t.exposeID('serviceId'),
|
||||
workshop: t.relation('workshop'),
|
||||
service: t.relation('service'),
|
||||
}),
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user