20 lines
504 B
JavaScript
20 lines
504 B
JavaScript
|
|
import { z } from "zod";
|
||
|
|
const create_order = z.object({
|
||
|
|
shopAccountId: z.string(),
|
||
|
|
productPrice: z.number(),
|
||
|
|
productQuantity: z.number(),
|
||
|
|
productName: z.string(),
|
||
|
|
customerName: z.string(),
|
||
|
|
customerPhone: z.string(),
|
||
|
|
customerEmail: z.string().optional(),
|
||
|
|
customerAddress: z.string(),
|
||
|
|
customerNote: z.string().optional()
|
||
|
|
});
|
||
|
|
const update_order = z.object({
|
||
|
|
status: z.string().optional()
|
||
|
|
});
|
||
|
|
export const order_validations = {
|
||
|
|
create_order,
|
||
|
|
update_order,
|
||
|
|
};
|