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