expose orderstatus instead string
This commit is contained in:
@@ -56,7 +56,7 @@ export class PrismaCrudGenerator<Types extends SchemaTypes> {
|
||||
required: false,
|
||||
}),
|
||||
orderBy: t.field({
|
||||
type: [this.getOrderBy(modelName)],
|
||||
type: [this.getOrderBy(modelName)], // using list to make it compatible with prismaOrderBy
|
||||
required: false,
|
||||
}),
|
||||
cursor: t.field({
|
||||
|
||||
@@ -5,7 +5,7 @@ import { NestMinioModule } from 'nestjs-minio';
|
||||
@Module({
|
||||
imports: [
|
||||
NestMinioModule.register({
|
||||
endPoint: process.env.MINIO_ENDPOINT ?? '10.0.27.1',
|
||||
endPoint: process.env.MINIO_ENDPOINT ?? '0.0.0.0',
|
||||
accessKey: process.env.MINIO_ACCESS_KEY ?? 'minioadmin',
|
||||
secretKey: process.env.MINIO_SECRET_KEY ?? 'minioadmin',
|
||||
useSSL: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from '@smatch-corp/nestjs-pothos';
|
||||
import { Builder } from '../Graphql/graphql.builder';
|
||||
import { PrismaService } from '../Prisma/prisma.service';
|
||||
|
||||
import { OrderStatus } from '@prisma/client';
|
||||
@Injectable()
|
||||
export class OrderSchema extends PothosSchema {
|
||||
constructor(
|
||||
@@ -26,7 +26,10 @@ export class OrderSchema extends PothosSchema {
|
||||
paymentId: t.exposeString('paymentId'),
|
||||
userId: t.exposeID('userId'),
|
||||
serviceId: t.exposeID('serviceId'),
|
||||
status: t.exposeString('status'),
|
||||
status: t.expose('status', {
|
||||
type: OrderStatus,
|
||||
nullable: false,
|
||||
}),
|
||||
total: t.exposeInt('total'),
|
||||
createdAt: t.expose('createdAt', { type: 'DateTime' }),
|
||||
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user