phong bat

This commit is contained in:
2024-10-17 15:15:08 +07:00
parent 59923b02cb
commit 5c56e79d63
19 changed files with 456 additions and 145 deletions

View File

@@ -24,15 +24,28 @@ export class PaymentSchema extends PothosSchema {
return this.builder.prismaObject('Payment', {
description: 'A payment in the system.',
fields: (t) => ({
id: t.exposeID('id'),
amount: t.exposeFloat('amount'),
id: t.exposeID('id', {
description: 'The ID of the payment.',
}),
amount: t.exposeFloat('amount', {
description: 'The amount of the payment.',
}),
status: t.expose('status', {
type: PaymentStatus,
nullable: false,
description: 'The status of the payment.',
}),
createdAt: t.expose('createdAt', {
type: 'DateTime',
description: 'The date and time the payment was created.',
}),
updatedAt: t.expose('updatedAt', {
type: 'DateTime',
description: 'The date and time the payment was updated.',
}),
order: t.relation('Order', {
description: 'The order for the payment.',
}),
createdAt: t.expose('createdAt', { type: 'DateTime' }),
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
order: t.relation('Order'),
}),
});
}