🎉👏 done
This commit is contained in:
@@ -2,7 +2,10 @@ import { z } from "zod";
|
||||
import { paginationModel } from "../../../core/pagination.utils";
|
||||
import { encodeCursor } from "../../../core/string.utils";
|
||||
import { customerInfoModel } from "../../customerinfo/data";
|
||||
import { paymentInfoPayloadModel } from "../../paymentinfo/data/entities";
|
||||
import {
|
||||
paymentInfoModel,
|
||||
paymentInfoPayloadModel,
|
||||
} from "../../paymentinfo/data/entities";
|
||||
import { productModel } from "../../product/data";
|
||||
|
||||
export enum OrderCreationStep {
|
||||
@@ -72,6 +75,7 @@ export const fullOrderModel = orderModel.merge(
|
||||
z.object({
|
||||
product: productModel,
|
||||
customerInfo: customerInfoModel.optional().nullable(),
|
||||
paymentInfo: paymentInfoModel.optional().nullable(),
|
||||
}),
|
||||
);
|
||||
export type FullOrderModel = z.infer<typeof fullOrderModel>;
|
||||
|
||||
@@ -87,8 +87,8 @@ export const paymentInfoModel = cardInfoModel.merge(
|
||||
id: z.number().int(),
|
||||
productId: z.number().int(),
|
||||
orderId: z.number().int(),
|
||||
createdAt: z.coerce.string().datetime(),
|
||||
updatedAt: z.coerce.string().datetime(),
|
||||
createdAt: z.coerce.string(),
|
||||
updatedAt: z.coerce.string(),
|
||||
}),
|
||||
);
|
||||
export type PaymentInfo = z.infer<typeof paymentInfoModel>;
|
||||
|
||||
Reference in New Issue
Block a user