OrderSchema: ZodObject<
    extendShape<
        {
            orderType: ZodDefault<ZodString>;
            billing: ZodOptional<
                ZodObject<
                    {
                        firstName: ZodString;
                        lastName: ZodString;
                        email: ZodOptional<ZodString>;
                        paymentMethod: ZodString;
                        phone: ZodOptional<ZodString>;
                        pickupMethod: ZodDefault<ZodString>;
                        streetAddress: ZodOptional<ZodString>;
                        city: ZodOptional<ZodString>;
                        country: ZodOptional<ZodString>;
                        state: ZodOptional<ZodString>;
                        zipCode: ZodOptional<ZodString>;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        firstName: string;
                        lastName: string;
                        email?: string;
                        paymentMethod: string;
                        phone?: string;
                        pickupMethod: string;
                        streetAddress?: string;
                        city?: string;
                        country?: string;
                        state?: string;
                        zipCode?: string;
                    },
                    {
                        firstName: string;
                        lastName: string;
                        email?: string;
                        paymentMethod: string;
                        phone?: string;
                        pickupMethod?: string;
                        streetAddress?: string;
                        city?: string;
                        country?: string;
                        state?: string;
                        zipCode?: string;
                    },
                >,
            >;
            note: ZodOptional<ZodString>;
            source: ZodOptional<ZodString>;
            pickupTime: ZodOptional<ZodString>;
            pickupDate: ZodOptional<ZodString>;
            pickupType: ZodString;
            tipAmount: ZodNumber;
            isPaid: ZodOptional<ZodBoolean>;
            status: ZodOptional<
                ZodEnum<["pending", "done", "served", "preparing", "dispatched"]>,
            >;
        },
        {
            items: ZodArray<
                ZodObject<
                    extendShape<
                        {
                            id: ZodString;
                            quantity: ZodNumber;
                            note: ZodOptional<ZodString>;
                        },
                        {
                            name: ZodString;
                            totalPrice: ZodNumber;
                            unitPrice: ZodNumber;
                            image: ZodString;
                            modifiers: ZodOptional<
                                ZodArray<
                                    ZodObject<
                                        extendShape<(...), (...)>,
                                        "strip",
                                        ZodTypeAny,
                                        {
                                            modifierId: ...;
                                            parentId: ...;
                                            name: ...;
                                            price: ...;
                                            modifierName: ...;
                                        },
                                        {
                                            modifierId: ...;
                                            parentId: ...;
                                            name: ...;
                                            price: ...;
                                            modifierName: ...;
                                        },
                                    >,
                                    "many",
                                >,
                            >;
                        },
                    >,
                    "strip",
                    ZodTypeAny,
                    {
                        id: string;
                        quantity: number;
                        note?: string;
                        name: string;
                        totalPrice: number;
                        unitPrice: number;
                        image: string;
                        modifiers?: {
                            modifierId: string;
                            parentId: string;
                            name: string;
                            price: number;
                            modifierName: string;
                        }[];
                    },
                    {
                        id: string;
                        quantity: number;
                        note?: string;
                        name: string;
                        totalPrice: number;
                        unitPrice: number;
                        image: string;
                        modifiers?: {
                            modifierId: string;
                            parentId: string;
                            name: string;
                            price: number;
                            modifierName: string;
                        }[];
                    },
                >,
                "many",
            >;
            totalAmount: ZodNumber;
            createdAt: ZodAny;
            customerName: ZodString;
            orderId: ZodString;
            discountAmount: ZodNumber;
            subtotal: ZodNumber;
            tax: ZodNumber;
            taxPercentage: ZodString;
            couponCode: ZodOptional<ZodNullable<ZodString>>;
        },
    >,
    "strip",
    ZodTypeAny,
    {
        orderType: string;
        billing?: {
            firstName: string;
            lastName: string;
            email?: string;
            paymentMethod: string;
            phone?: string;
            pickupMethod: string;
            streetAddress?: string;
            city?: string;
            country?: string;
            state?: string;
            zipCode?: string;
        };
        note?: string;
        source?: string;
        pickupTime?: string;
        pickupDate?: string;
        pickupType: string;
        tipAmount: number;
        isPaid?: boolean;
        status?: "pending"
        | "done"
        | "served"
        | "preparing"
        | "dispatched";
        items: {
            id: string;
            quantity: number;
            note?: string;
            name: string;
            totalPrice: number;
            unitPrice: number;
            image: string;
            modifiers?: {
                modifierId: string;
                parentId: string;
                name: string;
                price: number;
                modifierName: string;
            }[];
        }[];
        totalAmount: number;
        createdAt?: any;
        customerName: string;
        orderId: string;
        discountAmount: number;
        subtotal: number;
        tax: number;
        taxPercentage: string;
        couponCode?: null
        | string;
    },
    {
        orderType?: string;
        billing?: {
            firstName: string;
            lastName: string;
            email?: string;
            paymentMethod: string;
            phone?: string;
            pickupMethod?: string;
            streetAddress?: string;
            city?: string;
            country?: string;
            state?: string;
            zipCode?: string;
        };
        note?: string;
        source?: string;
        pickupTime?: string;
        pickupDate?: string;
        pickupType: string;
        tipAmount: number;
        isPaid?: boolean;
        status?: "pending"
        | "done"
        | "served"
        | "preparing"
        | "dispatched";
        items: {
            id: string;
            quantity: number;
            note?: string;
            name: string;
            totalPrice: number;
            unitPrice: number;
            image: string;
            modifiers?: {
                modifierId: string;
                parentId: string;
                name: string;
                price: number;
                modifierName: string;
            }[];
        }[];
        totalAmount: number;
        createdAt?: any;
        customerName: string;
        orderId: string;
        discountAmount: number;
        subtotal: number;
        tax: number;
        taxPercentage: string;
        couponCode?: null
        | string;
    },
> = ...

Complete order schema with all computed fields Extends BaseOrderSchema with calculated totals and metadata

const order = {
orderId: "ord_123456",
orderType: "delivery",
pickupType: "asap",
tipAmount: 5.00,
totalAmount: 45.99,
subtotal: 38.99,
tax: 3.90,
taxPercentage: "10%",
discountAmount: 2.00,
customerName: "John Doe",
createdAt: new Date(),
items: [...],
status: "preparing"
};