phong bat
This commit is contained in:
@@ -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'),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user