const mongoose = require('mongoose');

const smartCardActionsSchema = new mongoose.Schema({
    cardType: String,
    cardUid: String,
    queue: Boolean,
    queueCounter: Number,
    sequenceNumber: {
        type: Number,
        unique: true
    },
    action: String,
    actionValue: String,
    actionParams: {
        reasonCode: String,
        reasonID: String,
        contractID: String,
        instanceID: String,
        productID: String,
        creationDate: Date,
        expiryDate: Date,
        rides: Number,
        card: Object,
        data: Object
    }
});

const SmartCardActions = mongoose.model('SmartCardActions', smartCardActionsSchema);

module.exports = SmartCardActions;
