var mongoose = require("mongoose");

const modelSchema = new mongoose.Schema(
  {
    firstName: String,
    lastName: String,
    gender: String,
    address: String,
    state: String,
    email: {
      type: String,
    },
    phone: String,
    country: String,
    role: { type: String, default: "guest" }, //user, admin
    yearOfBirth: Number,
    user: {
      type: mongoose.Schema.Types.ObjectId,
      ref: "Users",
    },
    company: {
      type: mongoose.Schema.Types.ObjectId,
      ref: "Company",
    },
  },
  { timestamps: true }
);

const Guest = mongoose.model("Guest", modelSchema);
module.exports.Guest = Guest;
