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 { ServiceAndCategorySchema } from './serviceandcategory.schema';
import { Module } from '@nestjs/common'
import { ServiceAndCategorySchema } from './serviceandcategory.schema'
@Module({
providers: [ServiceAndCategorySchema],

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 ServiceAndCategorySchema extends PothosSchema {
@@ -14,7 +14,7 @@ export class ServiceAndCategorySchema extends PothosSchema {
@Inject(SchemaBuilderToken) private readonly builder: Builder,
private readonly prisma: PrismaService,
) {
super();
super()
}
@PothosRef()
@@ -35,7 +35,7 @@ export class ServiceAndCategorySchema extends PothosSchema {
description: 'The ID of the sub category.',
}),
}),
});
})
}
@Pothos()
@@ -53,9 +53,9 @@ export class ServiceAndCategorySchema extends PothosSchema {
take: args.take ?? undefined,
orderBy: args.orderBy ?? undefined,
where: args.filter ?? undefined,
});
})
},
}),
}));
}))
}
}