import mongoose from 'mongoose';


const RewardSchema = new mongoose.Schema({
    user: {
        name: String,
        email: String
    },
    cartSnapshot: {
        items: [{
            productId: String,
            name: String,
            price: Number,
            qty: Number
        }],
        subtotal: Number,
        tax: Number,
        total: Number
    },
    status: { type: String, default: 'requested' }
}, { timestamps: true });


export default mongoose.model('Reward', RewardSchema);