const mongoose = require("mongoose");

const careerSchema = new mongoose.Schema(
  {
    title: {
      type: String,
      required: true,
      trim: true,
    },

    department: {
      type: String,
      required: true,
      trim: true,
    },

    location: {
      type: String,
      required: true,
      trim: true,
    },

    jobType: {
      type: String,
      enum: [
        "Full Time",
        "Part Time",
        "Internship",
        "Contract",
      ],
      required: true,
    },

    experience: {
      type: String,
      required: true,
    },

    salary: {
      type: String,
      default: "",
    },

    vacancies: {
      type: Number,
      default: 1,
    },

    shortDescription: {
      type: String,
      required: true,
    },

    responsibilities: {
      type: String,
      required: true,
    },

    requirements: {
      type: String,
      required: true,
    },

    isActive: {
      type: Boolean,
      default: true,
    },
  },
  {
    timestamps: true,
  }
);

module.exports = mongoose.model(
  "Career",
  careerSchema
);