import { Schema, model, models } from "mongoose";

const OrderSchema = new Schema({
    userEmail: {
        type: String
    },
    phoneNumber:{
        type: String,
    },
    streetAddress:{
        type: String,
    },
    city:{
        type: String,
    },
    stateProvince:{
        type: String,
    },
    zipCode:{
        type: String,
    },
    country:{
        type: String,
    },
    cartProducts: {
        type: Object,
    },
    paid: {
        type: Boolean,
        default: false
    },

}, {timestamps: true})

export const Order = models?.Order || model('Order', OrderSchema);