USE `skillst1_rngkqnhl_printportal`;

CREATE TABLE IF NOT EXISTS `staff_hiring_applications` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `application_no` VARCHAR(60) NOT NULL UNIQUE,
  `name` VARCHAR(150) NOT NULL,
  `father_name` VARCHAR(150) NULL,
  `mobile` VARCHAR(30) NOT NULL,
  `whatsapp_no` VARCHAR(30) NULL,
  `email` VARCHAR(150) NULL,
  `dob` DATE NULL,
  `gender` VARCHAR(30) NULL,
  `address` TEXT NULL,
  `qualification` VARCHAR(255) NULL,
  `experience` VARCHAR(255) NULL,
  `applied_for` VARCHAR(120) NOT NULL,
  `expected_salary` DECIMAL(12,2) NULL,
  `joining_preference` VARCHAR(50) NULL,
  `photo` VARCHAR(255) NULL,
  `resume` VARCHAR(255) NULL,
  `status` ENUM('NEW','SHORTLISTED','INTERVIEW','SELECTED','REJECTED','JOINED') NOT NULL DEFAULT 'NEW',
  `remarks` TEXT NULL,
  `created_by` INT NULL,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  INDEX (`mobile`),
  INDEX (`status`)
);
