
module.exports = {
  dbConfig: {
    host: "localhost",
    user: "root",
    port: 3306,
    password: "", 
  },
  dbName: "HRMS", 
  resetDatabaseOnStart: true, 

  tables: {
    Department: {
      id_field: "departID", 
      fields: {
        DepartName: "VARCHAR(100) NOT NULL"
      }
    },
    Position: {
      id_field: "posID", 
      fields: {
        PosName: "VARCHAR(100) NOT NULL",
        RequiredQualification: "VARCHAR(255) NOT NULL"
      }
    },
  
    Employee: {
      id_field: "empID", 
      fields: {
        EmpFirstName: "VARCHAR(100) NOT NULL",
        EmpLastName: "VARCHAR(100) NOT NULL",
        EmpGender: "VARCHAR(10) NOT NULL",
        EmpDateOfBirth: "DATE NOT NULL",
        EmpEmail: "VARCHAR(100) NOT NULL UNIQUE",
        EmpTelephone: "INT NOT NULL", 
        EmpAddress: "VARCHAR(255) NOT NULL",
        EmpHireDate: "DATE NOT NULL",
        EmpStatus: "VARCHAR(50) NOT NULL", 
        departID: "VARCHAR(50) NOT NULL", 
        posID: "VARCHAR(50) NOT NULL"    
      },


      foreignKeys: [
        {
          field: "departID",
          referenceTable: "Department",
          referenceField: "departID"
        },
        {
          field: "posID",
          referenceTable: "Position",
          referenceField: "posID"
        }
      ]
    },
    Users: {
      id_field: "userID", 
      fields: {
        empID: "VARCHAR(50) NOT NULL UNIQUE", 
        UserName: "VARCHAR(50) NOT NULL UNIQUE",
        Password: "VARCHAR(255) NOT NULL" 
      },
      foreignKeys: [
        {
          field: "empID",
          referenceTable: "Employee",
          referenceField: "empID"
        }
      ]
    }
  }
};