var mongoose = require("mongoose");

const modelSchema = new mongoose.Schema(
  {
    name: String,
    email: {
      type: String,
    },
    password: String,
    phoneNumber: String,
    country: String,
    role: { type: String, default: "company-user" }, //company-user
    profileImage: {
      type: String,
      default:
        "https://try-s3-upload-plz.s3.amazonaws.com/file235930257089.Avatar.png",
    },
    isBlocked: { type: Boolean, default: false },
    keoskMode: { type: Boolean, default: false },
    fcmToken: String,
    company: {
      type: mongoose.Schema.Types.ObjectId,
      ref: "Company",
    },
  },
  { timestamps: true }
);

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