💥 Done (almost)

This commit is contained in:
user
2025-10-21 17:29:16 +03:00
parent 8a169f84cc
commit 88d430a15e
9 changed files with 149 additions and 169 deletions

View File

@@ -102,16 +102,22 @@ export function getDefaultPaginatedOrderInfoModel(): PaginatedOrderInfoModel {
};
}
export const newOrderModel = orderModel.pick({
basePrice: true,
displayPrice: true,
discountAmount: true,
orderPrice: true,
fullfilledPrice: true,
productId: true,
customerInfoId: true,
paymentInfoId: true,
});
export const newOrderModel = orderModel
.pick({
basePrice: true,
displayPrice: true,
discountAmount: true,
orderPrice: true,
fullfilledPrice: true,
productId: true,
customerInfoId: true,
paymentInfoId: true,
})
.extend({
currency: z.string().default("USD"),
customerInfoId: z.number().optional(),
paymentInfoId: z.number().optional(),
});
export type NewOrderModel = z.infer<typeof newOrderModel>;
export const createOrderPayloadModel = z.object({