const mongoose = require("mongoose");

const UserSchema = new mongoose.Schema(
  { 
    accountNumber:{
      type:String
    },
    firstname: {
      type: String
    },
    lastname: {
      type: String
    },
    email: {
      type: String,
      unique: true
    },
    phNum: {
      type: String,
      unique: true
    },
    password: {
      type: String
    },
    allowemail: {
      type: Boolean
    },
    allowsms: {
      type: Boolean
    },
    verified: {
      type: Boolean,
      default: false
    }
  }, {
  timestamps: true    // Add this option to enable timestamps
});

module.exports = mongoose.model("Users", UserSchema);