phong bat
This commit is contained in:
@@ -22,12 +22,26 @@ export class RefundTicketSchema extends PothosSchema {
|
||||
refundTicket() {
|
||||
return this.builder.prismaObject('RefundTicket', {
|
||||
fields: (t) => ({
|
||||
id: t.exposeID('id'),
|
||||
amount: t.exposeFloat('amount'),
|
||||
status: t.exposeString('status'),
|
||||
createdAt: t.expose('createdAt', { type: 'DateTime' }),
|
||||
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
|
||||
order: t.relation('order'),
|
||||
id: t.exposeID('id', {
|
||||
description: 'The ID of the refund ticket.',
|
||||
}),
|
||||
amount: t.exposeFloat('amount', {
|
||||
description: 'The amount of the refund ticket.',
|
||||
}),
|
||||
status: t.exposeString('status', {
|
||||
description: 'The status of the refund ticket.',
|
||||
}),
|
||||
createdAt: t.expose('createdAt', {
|
||||
type: 'DateTime',
|
||||
description: 'The date and time the refund ticket was created.',
|
||||
}),
|
||||
updatedAt: t.expose('updatedAt', {
|
||||
type: 'DateTime',
|
||||
description: 'The date and time the refund ticket was updated.',
|
||||
}),
|
||||
order: t.relation('order', {
|
||||
description: 'The order for the refund ticket.',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -38,6 +52,8 @@ export class RefundTicketSchema extends PothosSchema {
|
||||
this.builder.queryFields((t) => ({
|
||||
refundTickets: t.prismaField({
|
||||
type: [this.refundTicket()],
|
||||
description:
|
||||
'Retrieve a list of refund tickets with optional filtering, ordering, and pagination.',
|
||||
args: this.builder.generator.findManyArgs('RefundTicket'),
|
||||
resolve: async (query, root, args, ctx, info) => {
|
||||
return await this.prisma.refundTicket.findMany({
|
||||
|
||||
Reference in New Issue
Block a user