text: const mongoose = require("mongoose");
  const { omit } = require("lodash");
  const StaffSchema = mongoose.Schema(
    {
      type: {
        type: String,
        required: true,
        unique: true,
      },
      description: {
        type: String,
      },
    },
    { timestamps: true }
  );
  
  StaffSchema.set("toJSON", {
    virtuals: true,
    versionKey: false,
    transform: function (doc, ret) {
      // remove these props when object is serialized
      return omit((doc, ret), ["createdAt", "updatedAt", "_id"]);
    },
  });
  
  const Staff = mongoose.model("Staff", StaffSchema, "staff");
  module.exports = Staff;
  