const mongoose = require('mongoose');

const Schema = mongoose.Schema;

const luckyWheelHistorySchema = new Schema(
    {
        userId: { type: Schema.Types.ObjectId, ref: 'user', required: true },
        spinCost: { type: Number, required: true },
        reward: { type: Number, required: true },
        rewardLabel: { type: String, required: true },
        rewardIndex: { type: Number, required: true },
        balanceBefore: { type: Number, required: true },
        balanceAfter: { type: Number, required: true },
    },
    {
        timestamps: true,
    },
);

module.exports = mongoose.model('luckyWheelHistory', luckyWheelHistorySchema);
