const mongoose = require('mongoose');

const walletSchema = new mongoose.Schema({
    balance: {
      type: Number,
      required: true
    },
    referralBalance: {
      type: Number,
      required: true
    },
    transferRecipient: {
      type: String,
      required: true
    },
    transferRecipientCode: {
      type: String,
      required: true
    },
    user: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Account',
      required: true
    },
    currency: {
      type: String,
      required: true
    },
}, {
    timestamps: true,
    collection: 'wallets'
})

module.exports = mongoose.model("Wallet", walletSchema);