refactor: more legacy code replaced more on the model and a bit on the admin side

This commit is contained in:
user
2025-10-20 22:08:45 +03:00
parent 2fdb934ec9
commit 2ed74c267d
33 changed files with 1160 additions and 11574 deletions

View File

@@ -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(),
}),