-- Create settings table for admin PIN storage
CREATE TABLE IF NOT EXISTS `settings` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `pin_hash` VARCHAR(255) NOT NULL,
  `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Insert default PIN: 123456 (hashed using MD5)
-- Password: 123456
-- MD5 Hash: e10adc3949ba59abbe56e057f20f883e
INSERT INTO `settings` (`id`, `pin_hash`) VALUES 
(1, 'e10adc3949ba59abbe56e057f20f883e');
