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,5 +1,5 @@
import { Module } from '@nestjs/common';
import { WorkshopSubscriptionSchema } from './workshopsubscription.schema';
import { Module } from '@nestjs/common'
import { WorkshopSubscriptionSchema } from './workshopsubscription.schema'
@Module({
providers: [WorkshopSubscriptionSchema],

View File

@@ -1,12 +1,12 @@
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';
} from '@smatch-corp/nestjs-pothos'
import { Builder } from '../Graphql/graphql.builder'
import { PrismaService } from '../Prisma/prisma.service'
@Injectable()
export class WorkshopSubscriptionSchema extends PothosSchema {
@@ -14,7 +14,7 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
@Inject(SchemaBuilderToken) private readonly builder: Builder,
private readonly prisma: PrismaService,
) {
super();
super()
}
@PothosRef()
workshopSubscription() {
@@ -39,7 +39,7 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
'The date and time the workshop subscription was created.',
}),
}),
});
})
}
@Pothos()
@@ -54,7 +54,7 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
return await this.prisma.workshopSubscription.findUnique({
...query,
where: args.where,
});
})
},
}),
workshopSubscriptions: t.prismaField({
@@ -69,9 +69,9 @@ export class WorkshopSubscriptionSchema extends PothosSchema {
take: args.take ?? undefined,
orderBy: args.orderBy ?? undefined,
where: args.filter ?? undefined,
});
})
},
}),
}));
}))
}
}