refactor: more legacy code replaced more on the model and a bit on the admin side
This commit is contained in:
@@ -77,14 +77,16 @@ export type CardInfo = z.infer<typeof cardInfoModel>;
|
||||
export const paymentDetailsPayloadModel = z.object({
|
||||
method: z.enum([PaymentMethod.Card]),
|
||||
cardDetails: cardInfoModel,
|
||||
flightTicketInfoId: z.number().int(),
|
||||
productId: z.number().int(),
|
||||
orderId: z.number().int(),
|
||||
});
|
||||
export type PaymentDetailsPayload = z.infer<typeof paymentDetailsPayloadModel>;
|
||||
|
||||
export const paymentDetailsModel = cardInfoModel.merge(
|
||||
z.object({
|
||||
id: z.number().int(),
|
||||
flightTicketInfoId: z.number().int(),
|
||||
productId: z.number().int(),
|
||||
orderId: z.number().int(),
|
||||
createdAt: z.string().datetime(),
|
||||
updatedAt: z.string().datetime(),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user