const { DataTypes } = require("sequelize");
const sequelize = require("../db");

const PermitToWork = sequelize.define("PermitToWork", {
  data: {
    type: DataTypes.JSON,
    allowNull: true,
  },
  status: {
    type: DataTypes.ENUM("pending", "approved", "rejected"),
    defaultValue: "pending",
    allowNull: false,
  },
  aiAnalysis: {
    type: DataTypes.JSON,
    allowNull: true,
  },
});

module.exports = PermitToWork;
