--
-- Host: localhost    Database: sanggraloka_one
-- ------------------------------------------------------


--
-- Table structure for table `asset_categories`
--

CREATE TABLE `asset_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned DEFAULT NULL,
  `parent_id` int(10) unsigned DEFAULT NULL,
  `name` varchar(120) NOT NULL,
  `department` varchar(60) NOT NULL,
  `restricted` tinyint(1) NOT NULL DEFAULT 0,
  `default_checklist_id` int(10) unsigned DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_asset_categories_property` (`property_id`,`department`),
  KEY `idx_asset_categories_parent` (`parent_id`),
  KEY `fk_asset_categories_default_checklist` (`default_checklist_id`),
  CONSTRAINT `fk_asset_categories_default_checklist` FOREIGN KEY (`default_checklist_id`) REFERENCES `checklists` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_asset_categories_parent` FOREIGN KEY (`parent_id`) REFERENCES `asset_categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_asset_categories_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `asset_categories`
--

INSERT INTO `asset_categories` VALUES (1,1,NULL,'HVAC - Chiller','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(2,1,NULL,'HVAC - Cooling Tower','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(3,1,NULL,'HVAC - AHU','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(4,1,NULL,'HVAC - AC Split/FCU','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(5,1,NULL,'Kelistrikan - Genset','engineering',1,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(6,1,NULL,'Kelistrikan - Trafo/Panel TM','engineering',1,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(7,1,NULL,'Kelistrikan - UPS Gedung','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(8,1,NULL,'Plumbing - Pompa','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(9,1,NULL,'Plumbing - Water Heater/Boiler','engineering',1,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(10,1,NULL,'Plumbing - STP/WTP','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(11,1,NULL,'Transportasi Vertikal - Lift','engineering',1,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(12,1,NULL,'Transportasi Vertikal - Eskalator','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(13,1,NULL,'Fire & Life Safety - Fire Pump','engineering',1,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(14,1,NULL,'Fire & Life Safety - Hydrant/APAR/MCFA','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(15,1,NULL,'Kolam & Spa','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(16,1,NULL,'Laundry','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(17,1,NULL,'Bangunan','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(18,1,NULL,'Sipil - Cat & Dinding','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(19,1,NULL,'Sipil - Kayu & Finishing','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(20,1,NULL,'Sipil - Lantai & Batu','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(21,1,NULL,'Sipil - Basah & Sealant','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(22,1,NULL,'IT - Server & Jaringan','it',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(23,1,NULL,'IT - Keamanan Elektronik (CCTV)','it',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(24,1,NULL,'IT - Guest Facing','it',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(25,1,NULL,'IT - Operasional','it',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(26,1,NULL,'Kitchen - Cold Room/Freezer/Chiller','kitchen',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(27,1,NULL,'Kitchen - Cooking Equipment','kitchen',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(28,1,NULL,'Kitchen - Exhaust Hood & Duct','kitchen',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(29,1,NULL,'Gym','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(30,1,NULL,'Transport','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(31,1,NULL,'Housekeeping Equipment','housekeeping',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(32,1,NULL,'In-room Unit (TV/Minibar/Safe/Hair Dryer)','engineering',0,NULL,'2026-07-08 18:57:08','2026-07-08 18:57:08'),(33,1,NULL,'Plumbing - Tangki Air (Roof Tank/GWT)','engineering',0,NULL,'2026-07-08 18:57:09','2026-07-08 18:57:09'),(34,1,NULL,'Kelistrikan - Penangkal Petir & Grounding','engineering',0,NULL,'2026-07-08 18:57:09','2026-07-08 18:57:09'),(35,1,NULL,'HVAC - Exhaust Fan & Ventilasi','engineering',0,NULL,'2026-07-08 18:57:09','2026-07-08 18:57:09');

--
-- Table structure for table `asset_custody`
--

CREATE TABLE `asset_custody` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `asset_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned NOT NULL,
  `purpose` varchar(255) NOT NULL COMMENT 'keperluan pinjam',
  `checkout_at` datetime NOT NULL DEFAULT current_timestamp(),
  `expected_return_date` date DEFAULT NULL,
  `returned_at` datetime DEFAULT NULL,
  `condition_out` varchar(255) NOT NULL COMMENT 'kondisi aset saat keluar',
  `condition_in` varchar(255) DEFAULT NULL COMMENT 'kondisi aset saat kembali',
  `odometer_out` int(10) unsigned DEFAULT NULL COMMENT 'HANYA relevan kendaraan; kosong utk aset lain',
  `odometer_in` int(10) unsigned DEFAULT NULL,
  `status` enum('dipegang','dikembalikan') NOT NULL DEFAULT 'dipegang',
  `created_by` int(10) unsigned DEFAULT NULL COMMENT 'user yang mencatat checkout (FK users)',
  `notes` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_asset_custody_property` (`property_id`),
  KEY `idx_asset_custody_asset` (`property_id`,`asset_id`),
  KEY `idx_asset_custody_employee` (`property_id`,`employee_id`),
  KEY `idx_asset_custody_status` (`property_id`,`status`),
  KEY `fk_asset_custody_asset` (`asset_id`),
  KEY `fk_asset_custody_employee` (`employee_id`),
  KEY `fk_asset_custody_created_by` (`created_by`),
  CONSTRAINT `fk_asset_custody_asset` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_asset_custody_created_by` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_asset_custody_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_asset_custody_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `asset_custody`
--

INSERT INTO `asset_custody` VALUES (1,1,21,3,'DUMMY — antar-jemput tamu ke Bandara Ngurah Rai','2026-07-01 08:00:00','2026-07-01','2026-07-01 15:30:00','DUMMY — kondisi baik, BBM full, tidak ada lecet','DUMMY — kondisi baik, BBM 1/2, tidak ada lecet baru',45000,45120,'dikembalikan',1,'DUMMY — seed asset-custody (0028)','2026-07-09 16:46:28','2026-07-09 16:46:28'),(2,1,21,1,'DUMMY — belanja keperluan operasional ke kota','2026-07-07 16:46:28','2026-07-10',NULL,'DUMMY — kondisi baik, BBM full, tidak ada lecet',NULL,45210,NULL,'dipegang',1,'DUMMY — seed asset-custody (0028)','2026-07-09 16:46:28','2026-07-09 17:00:34');

--
-- Table structure for table `asset_documents`
--

CREATE TABLE `asset_documents` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `asset_id` int(10) unsigned NOT NULL,
  `type` enum('manual','warranty','certificate','permit','calibration','other') NOT NULL,
  `title` varchar(150) NOT NULL,
  `file` varchar(255) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `reminder_days` smallint(5) unsigned DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_asset_documents_asset` (`asset_id`),
  KEY `idx_asset_documents_expiry` (`expiry_date`),
  CONSTRAINT `fk_asset_documents_asset` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `asset_documents`
--

INSERT INTO `asset_documents` VALUES (1,1,'permit','SLO Genset (Sertifikat Laik Operasi)','docs/slo_genset_htl1.pdf','2026-07-28',60,'2026-07-08 18:57:09','2026-07-08 18:57:09'),(2,21,'permit','KIR Mobil Operasional Avanza','docs/kir_avanza_htl1.pdf','2026-08-02',30,'2026-07-08 18:57:09','2026-07-08 18:57:09'),(3,1,'permit','SLO Genset — DUMMY','asset_documents/1/4faa47ad43ad11988753eed118e86353.pdf','2026-08-18',30,'2026-07-09 13:53:53','2026-07-09 13:54:53');

--
-- Table structure for table `assets`
--

CREATE TABLE `assets` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `asset_code` varchar(40) NOT NULL,
  `accounting_asset_no` varchar(60) DEFAULT NULL,
  `name` varchar(150) NOT NULL,
  `category_id` int(10) unsigned NOT NULL,
  `location_id` int(10) unsigned DEFAULT NULL,
  `brand` varchar(100) DEFAULT NULL,
  `model` varchar(100) DEFAULT NULL,
  `serial_number` varchar(100) DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `purchase_date` date DEFAULT NULL,
  `purchase_price` decimal(14,2) DEFAULT NULL,
  `vendor_id` int(10) unsigned DEFAULT NULL,
  `warranty_until` date DEFAULT NULL,
  `install_date` date DEFAULT NULL,
  `expected_life_years` smallint(5) unsigned DEFAULT NULL,
  `criticality` enum('low','normal','high','critical') NOT NULL DEFAULT 'normal',
  `status` enum('active','out_of_service','disposed') NOT NULL DEFAULT 'active',
  `meter_type` enum('none','hour','km','cycle') NOT NULL DEFAULT 'none',
  `meter_current` decimal(14,2) DEFAULT NULL,
  `parent_asset_id` int(10) unsigned DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_assets_property_code` (`property_id`,`asset_code`),
  UNIQUE KEY `uq_assets_property_accounting_no` (`property_id`,`accounting_asset_no`),
  KEY `idx_assets_property_category` (`property_id`,`category_id`),
  KEY `idx_assets_property_location` (`property_id`,`location_id`),
  KEY `idx_assets_property_status` (`property_id`,`status`),
  KEY `idx_assets_parent` (`parent_asset_id`),
  KEY `idx_assets_vendor` (`vendor_id`),
  KEY `fk_assets_category` (`category_id`),
  KEY `fk_assets_location` (`location_id`),
  CONSTRAINT `fk_assets_category` FOREIGN KEY (`category_id`) REFERENCES `asset_categories` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_assets_location` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_assets_parent` FOREIGN KEY (`parent_asset_id`) REFERENCES `assets` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_assets_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_assets_vendor` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `assets`
--

INSERT INTO `assets` VALUES (1,1,'AST-000001','FA-2020-001','Genset Cummins 500kVA',5,12,'Cummins','C500D5','CUM500-001',NULL,'2020-01-15',850000000.00,1,'2023-01-15','2020-02-01',15,'critical','active','hour',4830.50,NULL,'Genset utama backup PLN','2026-07-08 18:57:08','2026-07-08 18:57:09'),(2,1,'AST-000002','FA-2020-002','Panel LVMDP Utama',6,12,'Schneider','LVMDP-A','SCH-LV-001',NULL,'2020-01-15',220000000.00,NULL,NULL,'2020-02-01',20,'critical','active','none',NULL,NULL,'Panel distribusi utama gedung','2026-07-08 18:57:08','2026-07-08 18:57:08'),(3,1,'AST-000003','FA-2019-010','Lift Tamu 1',11,6,'Mitsubishi','NEXWAY','MIT-LIFT-001',NULL,'2019-05-10',650000000.00,2,'2022-05-10','2019-06-01',20,'critical','active','none',NULL,NULL,'Lift tamu lobby - podium','2026-07-08 18:57:08','2026-07-08 18:57:08'),(4,1,'AST-000004','FA-2019-011','Lift Servis',11,11,'Mitsubishi','NEXWAY-S','MIT-LIFT-002',NULL,'2019-05-10',600000000.00,2,'2022-05-10','2019-06-01',20,'critical','active','none',NULL,NULL,'Lift servis BOH','2026-07-08 18:57:08','2026-07-08 18:57:08'),(5,1,'AST-000005','FA-2021-020','Fire Pump Electric',13,12,'Grundfos','FP-E100','GRD-FP-001',NULL,'2021-03-01',180000000.00,NULL,'2023-03-01','2021-04-01',15,'critical','active','hour',120.00,NULL,'Fire pump electric utama','2026-07-08 18:57:08','2026-07-08 18:57:08'),(6,1,'AST-000006','FA-2021-021','Fire Pump Diesel',13,12,'Grundfos','FP-D100','GRD-FP-002',NULL,'2021-03-01',210000000.00,NULL,'2023-03-01','2021-04-01',15,'critical','active','hour',45.00,NULL,'Fire pump diesel cadangan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(7,1,'AST-000007','FA-2022-030','Boiler Water Heater',9,11,'Rheem','WH-B200','RHM-WH-001',NULL,'2022-02-10',95000000.00,NULL,'2024-02-10','2022-03-01',12,'high','active','none',NULL,NULL,'Boiler suplai air panas kamar','2026-07-08 18:57:08','2026-07-08 18:57:08'),(8,1,'AST-000008','FA-2021-040','Chiller Utama',1,11,'Daikin','CH-500RT','DAI-CH-001',NULL,'2021-06-01',780000000.00,NULL,'2023-06-01','2021-07-01',18,'critical','active','hour',8200.00,NULL,'Chiller sentral gedung','2026-07-08 18:57:08','2026-07-08 18:57:08'),(9,1,'AST-000009','FA-2021-041','Cooling Tower 1',2,11,'Baltimore','CT-300','BAL-CT-001',NULL,'2021-06-01',120000000.00,NULL,'2023-06-01','2021-07-01',15,'high','active','none',NULL,NULL,'Cooling tower pasangan chiller','2026-07-08 18:57:08','2026-07-08 18:57:08'),(10,1,'AST-000010','FA-2022-050','AHU Lantai 12',3,7,'Daikin','AHU-12F','DAI-AHU-012',NULL,'2022-01-01',65000000.00,NULL,'2024-01-01','2022-02-01',15,'normal','active','hour',3100.00,NULL,'AHU koridor lantai 12','2026-07-08 18:57:08','2026-07-08 18:57:08'),(11,1,'AST-000011','FA-2022-060','AC Split Kamar 1201',4,1,'Daikin','FTKC25','DAI-AC-1201',NULL,'2022-05-01',6500000.00,NULL,'2024-05-01','2022-05-15',8,'normal','active','none',NULL,NULL,'AC split kamar 1201','2026-07-08 18:57:08','2026-07-08 18:57:08'),(12,1,'AST-000012','FA-2022-061','AC Split Kamar 1202',4,2,'Daikin','FTKC25','DAI-AC-1202',NULL,'2022-05-01',6500000.00,NULL,'2024-05-01','2022-05-15',8,'normal','active','none',NULL,NULL,'AC split kamar 1202','2026-07-08 18:57:08','2026-07-08 18:57:08'),(13,1,'AST-000013','FA-2022-062','AC Split Kamar 0801',4,4,'Daikin','FTKC25','DAI-AC-0801',NULL,'2022-05-01',6500000.00,NULL,'2024-05-01','2022-05-15',8,'normal','active','none',NULL,NULL,'AC split kamar 0801','2026-07-08 18:57:08','2026-07-08 18:57:08'),(14,1,'AST-000014','FA-2020-070','Pompa Booster Air Bersih',8,11,'Grundfos','CR-45','GRD-PB-001',NULL,'2020-08-01',55000000.00,NULL,'2022-08-01','2020-09-01',15,'high','active','hour',12500.00,NULL,'Pompa booster distribusi air','2026-07-08 18:57:08','2026-07-08 18:57:08'),(15,1,'AST-000015','FA-2022-080','CCTV NVR Utama',23,15,'Hikvision','NVR-32CH','HIK-NVR-001',NULL,'2022-03-01',45000000.00,NULL,'2024-03-01','2022-03-15',6,'high','active','none',NULL,NULL,'NVR 32 channel ruang server','2026-07-08 18:57:08','2026-07-08 18:57:08'),(16,1,'AST-000016','FA-2022-081','Server Utama PMS',22,15,'Dell','PowerEdge R740','DEL-SRV-001',NULL,'2022-03-01',95000000.00,NULL,'2025-03-01','2022-03-15',6,'critical','active','none',NULL,NULL,'Server aplikasi PMS','2026-07-08 18:57:08','2026-07-08 18:57:08'),(17,1,'AST-000017','FA-2021-090','Cold Room Kitchen 1',26,13,'Panasonic','CR-1000','PAN-CR-001',NULL,'2021-09-01',85000000.00,NULL,'2023-09-01','2021-09-15',10,'critical','active','none',NULL,NULL,'Cold room dapur utama','2026-07-08 18:57:08','2026-07-08 18:57:08'),(18,1,'AST-000018','FA-2021-091','Freezer Kitchen 1',26,13,'Panasonic','FZ-500','PAN-FZ-001',NULL,'2021-09-01',45000000.00,NULL,'2023-09-01','2021-09-15',10,'critical','active','none',NULL,NULL,'Freezer dapur utama','2026-07-08 18:57:08','2026-07-08 18:57:08'),(19,1,'AST-000019','FA-2020-100','Pompa Sirkulasi Kolam',15,8,'Pentair','WF-26','PEN-PS-001',NULL,'2020-11-01',35000000.00,NULL,'2022-11-01','2020-11-15',10,'normal','active','hour',9800.00,NULL,'Pompa sirkulasi kolam renang','2026-07-08 18:57:08','2026-07-08 18:57:08'),(20,1,'AST-000020','FA-2022-110','Washer Laundry Industrial',16,14,'Electrolux','WI-50','ELX-WI-001',NULL,'2022-04-01',180000000.00,NULL,'2024-04-01','2022-04-15',10,'normal','active','cycle',2100.00,NULL,'Mesin cuci industrial laundry','2026-07-08 18:57:08','2026-07-08 18:57:08'),(21,1,'AST-000021','FA-2023-120','Mobil Operasional Avanza',30,16,'Toyota','Avanza 1.3 G','TYT-AVZ-001',NULL,'2023-02-01',235000000.00,NULL,'2026-02-01','2023-02-15',8,'normal','active','km',46850.00,NULL,'Mobil operasional engineering & purchasing','2026-07-08 18:57:08','2026-07-08 18:57:09'),(61,1,'AST-000061','FA-2024-201','AC Cassette Lobby 1',4,6,'Daikin',NULL,NULL,NULL,'2024-01-10',18500000.00,NULL,'2027-01-08',NULL,NULL,'normal','active','none',NULL,NULL,'AC cassette area lobby sisi timur','2026-07-08 18:57:09','2026-07-08 18:57:09'),(62,1,'AST-000062','FA-2024-202','AC Cassette Lobby 2',4,6,'Daikin',NULL,NULL,NULL,'2024-01-10',18500000.00,NULL,'2027-01-08',NULL,NULL,'normal','active','none',NULL,NULL,'AC cassette area lobby sisi barat','2026-07-08 18:57:09','2026-07-08 18:57:09'),(63,1,'AST-000063','FA-2024-203','CCTV Dome Lobby',23,6,'Hikvision',NULL,NULL,NULL,'2024-02-01',3500000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Kamera dome pintu utama','2026-07-08 18:57:09','2026-07-08 18:57:09'),(64,1,'AST-000064','FA-2024-204','Access Control Pintu Utama',23,6,'ZKTeco',NULL,NULL,NULL,'2024-02-01',8000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Access control pintu utama staff','2026-07-08 18:57:09','2026-07-08 18:57:09'),(65,1,'AST-000065','FA-2024-205','Digital Signage Lobby',25,6,'Samsung',NULL,NULL,NULL,'2024-03-01',15000000.00,NULL,'2027-04-08',NULL,NULL,'low','active','none',NULL,NULL,'Layar informasi 55 inch','2026-07-08 18:57:09','2026-07-08 18:57:09'),(66,1,'AST-000066','FA-2023-210','Pompa Sirkulasi Kolam 2',15,8,'Pentair',NULL,NULL,NULL,'2023-06-01',35000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Pompa sirkulasi cadangan/paralel','2026-07-08 18:57:09','2026-07-08 18:57:09'),(67,1,'AST-000067','FA-2023-211','Sand Filter Kolam',15,8,'Emaux',NULL,NULL,NULL,'2023-06-01',28000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Filter pasir utama kolam','2026-07-08 18:57:09','2026-07-08 18:57:09'),(68,1,'AST-000068','FA-2023-212','Dosing Pump Chlorine',15,8,'Etatron',NULL,NULL,NULL,'2023-06-01',7500000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Dosing otomatis chlorine','2026-07-08 18:57:09','2026-07-08 18:57:09'),(69,1,'AST-000069','FA-2023-213','Pool Heater',15,8,'Hayward',NULL,NULL,NULL,'2023-06-01',45000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Pemanas kolam jacuzzi','2026-07-08 18:57:09','2026-07-08 18:57:09'),(70,1,'AST-000070','FA-2022-220','Ice Maker Kitchen',26,13,'Hoshizaki',NULL,NULL,NULL,'2022-08-01',38000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Mesin es dapur utama','2026-07-08 18:57:09','2026-07-08 18:57:09'),(71,1,'AST-000071','FA-2022-221','Combi Oven',27,13,'Rational',NULL,NULL,NULL,'2022-08-01',185000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Combi oven 10 tray','2026-07-08 18:57:09','2026-07-08 18:57:09'),(72,1,'AST-000072','FA-2022-222','Exhaust Hood Dapur Utama',28,13,'Custom',NULL,NULL,NULL,'2022-08-01',65000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Hood + duct, risiko kebakaran grease','2026-07-08 18:57:09','2026-07-08 18:57:09'),(73,1,'AST-000073','FA-2022-223','Dishwasher Kitchen',27,13,'Winterhalter',NULL,NULL,NULL,'2022-08-01',95000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Dishwasher rack conveyor','2026-07-08 18:57:09','2026-07-08 18:57:09'),(74,1,'AST-000074','FA-2023-230','Rack UPS Server',22,15,'APC',NULL,NULL,NULL,'2023-03-01',28000000.00,NULL,'2026-10-08',NULL,NULL,'high','active','none',NULL,NULL,'UPS rack 6kVA ruang server','2026-07-08 18:57:09','2026-07-08 18:57:09'),(75,1,'AST-000075','FA-2023-231','Core Switch',22,15,'Cisco',NULL,NULL,NULL,'2023-03-01',45000000.00,NULL,NULL,NULL,NULL,'critical','active','none',NULL,NULL,'Core switch jaringan gedung','2026-07-08 18:57:09','2026-07-08 18:57:09'),(76,1,'AST-000076','FA-2023-232','Router Utama',22,15,'MikroTik',NULL,NULL,NULL,'2023-03-01',25000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Router gateway ISP','2026-07-08 18:57:09','2026-07-08 18:57:09'),(77,1,'AST-000077','FA-2023-233','NAS Backup',22,15,'Synology',NULL,NULL,NULL,'2023-03-01',32000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'NAS backup harian PMS','2026-07-08 18:57:09','2026-07-08 18:57:09'),(78,1,'AST-000078','FA-2023-234','AC Presisi Ruang Server',4,15,'Stulz',NULL,NULL,NULL,'2023-03-01',85000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'AC presisi 24 jam ruang server','2026-07-08 18:57:09','2026-07-08 18:57:09'),(79,1,'AST-000079','FA-2020-240','Trafo 1250 kVA',6,12,'Trafindo',NULL,NULL,NULL,'2020-01-15',450000000.00,NULL,NULL,NULL,NULL,'critical','active','none',NULL,NULL,'Trafo distribusi utama','2026-07-08 18:57:09','2026-07-08 18:57:09'),(80,1,'AST-000080','FA-2020-241','Panel SDP Podium',6,12,'Schneider',NULL,NULL,NULL,'2020-01-15',120000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Sub distribution panel podium','2026-07-08 18:57:09','2026-07-08 18:57:09'),(81,1,'AST-000081','FA-2020-242','Capacitor Bank',6,12,'Schneider',NULL,NULL,NULL,'2020-01-15',65000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Perbaikan faktor daya','2026-07-08 18:57:09','2026-07-08 18:57:09'),(82,1,'AST-000082','FA-2020-250','Roof Tank 1',33,17,'Penguin',NULL,NULL,NULL,'2020-02-01',40000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Tangki air atap 10 m3','2026-07-08 18:57:09','2026-07-08 18:57:09'),(83,1,'AST-000083','FA-2020-251','Pompa Booster Rooftop',8,17,'Grundfos',NULL,NULL,NULL,'2020-02-01',48000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Booster distribusi lantai atas','2026-07-08 18:57:09','2026-07-08 18:57:09'),(84,1,'AST-000084','FA-2020-252','Penangkal Petir',34,17,'Kurn',NULL,NULL,NULL,'2020-02-01',35000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Penangkal petir elektrostatis + grounding','2026-07-08 18:57:09','2026-07-08 18:57:09'),(85,1,'AST-000085','FA-2020-253','Exhaust Fan Rooftop',35,17,'KDK',NULL,NULL,NULL,'2020-02-01',8500000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Exhaust shaft toilet umum','2026-07-08 18:57:09','2026-07-08 18:57:09'),(86,1,'AST-000086','FA-2023-260','Treadmill 1',29,9,'Life Fitness',NULL,NULL,NULL,'2023-05-01',45000000.00,NULL,'2026-11-08',NULL,NULL,'normal','active','none',NULL,NULL,'Treadmill komersial','2026-07-08 18:57:09','2026-07-08 18:57:09'),(87,1,'AST-000087','FA-2023-261','Treadmill 2',29,9,'Life Fitness',NULL,NULL,NULL,'2023-05-01',45000000.00,NULL,'2026-11-08',NULL,NULL,'normal','active','none',NULL,NULL,'Treadmill komersial','2026-07-08 18:57:09','2026-07-08 18:57:09'),(88,1,'AST-000088','FA-2023-262','Sepeda Statis',29,9,'Matrix',NULL,NULL,NULL,'2023-05-01',25000000.00,NULL,NULL,NULL,NULL,'low','active','none',NULL,NULL,'Upright bike','2026-07-08 18:57:09','2026-07-08 18:57:09'),(89,1,'AST-000089','FA-2023-263','Sauna Generator',29,9,'Harvia',NULL,NULL,NULL,'2023-05-01',55000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Generator sauna gym','2026-07-08 18:57:09','2026-07-08 18:57:09'),(90,1,'AST-000090','FA-2022-270','Dryer Laundry Industrial',16,14,'Electrolux',NULL,NULL,NULL,'2022-04-01',120000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Dryer 30kg — lint trap risiko kebakaran','2026-07-08 18:57:09','2026-07-08 18:57:09'),(91,1,'AST-000091','FA-2022-271','Flatwork Ironer',16,14,'Electrolux',NULL,NULL,NULL,'2022-04-01',150000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Roll ironer linen','2026-07-08 18:57:09','2026-07-08 18:57:09'),(92,1,'AST-000092','FA-2024-280','CCTV Basement',23,25,'Hikvision',NULL,NULL,NULL,'2024-02-01',3000000.00,NULL,NULL,NULL,NULL,'normal','active','none',NULL,NULL,'Kamera bullet area parkir basement','2026-07-08 18:57:09','2026-07-08 18:57:09'),(93,1,'AST-000093','FA-2020-281','Pompa Sump Pit Basement',8,25,'Grundfos',NULL,NULL,NULL,'2020-03-01',18000000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Pompa banjir sump pit + float switch','2026-07-08 18:57:09','2026-07-08 18:57:09'),(94,1,'AST-000094','FA-2024-282','Access Point Lantai 3',22,24,'Ruckus',NULL,NULL,NULL,'2024-01-05',4500000.00,NULL,'2027-03-08',NULL,NULL,'normal','active','none',NULL,NULL,'AP Wi-Fi koridor & kamar lantai 3','2026-07-08 18:57:09','2026-07-08 18:57:09'),(95,1,'AST-000095','FA-2021-290','APAR Lobby',14,6,'Servvo',NULL,NULL,NULL,'2021-01-01',1200000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'APAR powder 6kg dekat resepsionis','2026-07-08 18:57:09','2026-07-08 18:57:09'),(96,1,'AST-000096','FA-2021-291','Hydrant Box Basement',14,25,'Ozeki',NULL,NULL,NULL,'2021-01-01',6500000.00,NULL,NULL,NULL,NULL,'high','active','none',NULL,NULL,'Hydrant box indoor basement','2026-07-08 18:57:09','2026-07-08 18:57:09');

--
-- Table structure for table `audit_logs`
--

CREATE TABLE `audit_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `ts` datetime NOT NULL DEFAULT current_timestamp(),
  `user_id` int(10) unsigned DEFAULT NULL,
  `role` varchar(30) DEFAULT NULL,
  `property_id` int(10) unsigned DEFAULT NULL,
  `module` enum('fix','crew','sell') NOT NULL,
  `action` enum('create','update','delete','view_sensitive','export','login','logout','approve','override','stepup_ok','stepup_fail') NOT NULL,
  `entity` varchar(60) NOT NULL,
  `entity_id` varchar(60) DEFAULT NULL,
  `before_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'field sensitif ikut terenkripsi di level aplikasi' CHECK (json_valid(`before_data`)),
  `after_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'field sensitif ikut terenkripsi di level aplikasi' CHECK (json_valid(`after_data`)),
  `ip` varchar(45) DEFAULT NULL,
  `device` varchar(255) DEFAULT NULL,
  `note` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_audit_logs_property_ts` (`property_id`,`ts`),
  KEY `idx_audit_logs_user` (`user_id`),
  KEY `idx_audit_logs_entity` (`entity`,`entity_id`),
  CONSTRAINT `fk_audit_logs_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_audit_logs_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `audit_logs`
--

INSERT INTO `audit_logs` VALUES (1,'2026-07-08 17:14:02',901,'hr_admin',1,'crew','login','users','901',NULL,NULL,NULL,NULL,'Login QC demo HR Manager (DUMMY demo log)'),(2,'2026-07-08 18:14:02',901,'hr_admin',1,'crew','view_sensitive','hr_employees','3',NULL,NULL,NULL,NULL,'Lihat data sensitif karyawan utk proses exit (DUMMY demo log)'),(3,'2026-07-08 18:44:02',501,'gm',1,'crew','stepup_ok','hr_payroll_periods','1',NULL,NULL,NULL,NULL,'Verifikasi PIN payroll sukses (DUMMY demo log)'),(4,'2026-07-08 18:39:02',501,'gm',1,'crew','stepup_fail','hr_payroll_periods',NULL,NULL,NULL,NULL,NULL,'PIN salah pada percobaan pertama (DUMMY demo log)'),(5,'2026-07-08 19:14:02',4,'technician',1,'fix','logout','users','4',NULL,NULL,NULL,NULL,'Logout teknisi selesai shift (DUMMY demo log)'),(6,'2026-07-08 22:40:51',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','curl/8.19.0',NULL),(7,'2026-07-08 22:41:15',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":8}','::1','curl/8.19.0',NULL),(8,'2026-07-08 22:47:10',900,'gm',1,'fix','export','locations',NULL,NULL,'{\"rows\":25}','::1','curl/8.19.0',NULL),(9,'2026-07-08 23:06:50',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','curl/8.19.0',NULL),(10,'2026-07-08 23:06:51',900,'gm',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":8}','::1','curl/8.19.0',NULL),(11,'2026-07-08 23:06:51',900,'gm',1,'sell','export','mkt_partners',NULL,NULL,'{\"rows\":3}','::1','curl/8.19.0',NULL),(12,'2026-07-08 23:06:52',900,'gm',1,'crew','export','hr_leaves',NULL,NULL,'{\"rows\":3}','::1','curl/8.19.0',NULL),(13,'2026-07-08 23:07:52',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','curl/8.19.0',NULL),(14,'2026-07-08 23:07:53',900,'gm',1,'crew','export','hr_vacancies',NULL,NULL,'{\"rows\":1}','::1','curl/8.19.0',NULL),(15,'2026-07-08 23:07:55',900,'gm',1,'sell','export','mkt_keywords',NULL,NULL,'{\"rows\":8}','::1','curl/8.19.0',NULL),(16,'2026-07-08 23:07:56',900,'gm',1,'sell','export','mkt_bookings',NULL,NULL,'{\"rows\":5}','::1','curl/8.19.0',NULL),(17,'2026-07-08 23:07:57',900,'gm',1,'crew','export','hr_positions',NULL,NULL,'{\"rows\":5}','::1','curl/8.19.0',NULL),(18,'2026-07-08 23:08:01',900,'gm',1,'sell','export','mkt_products',NULL,NULL,'{\"rows\":24}','::1','curl/8.19.0',NULL),(19,'2026-07-08 23:08:02',900,'gm',1,'crew','export','hr_leaves',NULL,NULL,'{\"rows\":3}','::1','curl/8.19.0',NULL),(20,'2026-07-08 23:08:06',900,'gm',1,'fix','export','broadcasts',NULL,NULL,'{\"rows\":2}','::1','curl/8.19.0',NULL),(21,'2026-07-08 23:08:07',900,'gm',1,'fix','export','assets',NULL,NULL,'{\"rows\":57}','::1','curl/8.19.0',NULL),(22,'2026-07-08 23:08:08',900,'gm',1,'crew','export','hr_courses',NULL,NULL,'{\"rows\":42}','::1','curl/8.19.0',NULL),(23,'2026-07-08 23:08:09',900,'gm',1,'crew','export','hr_onboarding',NULL,NULL,'{\"rows\":1}','::1','curl/8.19.0',NULL),(24,'2026-07-08 23:08:11',900,'gm',1,'fix','export','notifications',NULL,NULL,'{\"rows\":0}','::1','curl/8.19.0',NULL),(25,'2026-07-08 23:08:13',900,'gm',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":8}','::1','curl/8.19.0',NULL),(26,'2026-07-08 23:08:14',900,'gm',1,'crew','export','hr_attendance_days',NULL,NULL,'{\"rows\":56}','::1','curl/8.19.0',NULL),(27,'2026-07-08 23:08:15',900,'gm',1,'crew','export','hr_discipline',NULL,NULL,'{\"rows\":2}','::1','curl/8.19.0',NULL),(28,'2026-07-08 23:08:17',900,'gm',1,'crew','export','hr_employee_comp',NULL,NULL,'{\"rows\":6}','::1','curl/8.19.0',NULL),(29,'2026-07-08 23:08:18',900,'gm',1,'fix','export','locations',NULL,NULL,'{\"rows\":25}','::1','curl/8.19.0',NULL),(30,'2026-07-08 23:08:19',900,'gm',1,'sell','export','mkt_kols',NULL,NULL,'{\"rows\":2}','::1','curl/8.19.0',NULL),(31,'2026-07-08 23:08:19',900,'gm',1,'sell','export','mkt_partners',NULL,NULL,'{\"rows\":3}','::1','curl/8.19.0',NULL),(32,'2026-07-08 23:08:20',900,'gm',1,'crew','export','hr_kpi_definitions',NULL,NULL,'{\"rows\":6}','::1','curl/8.19.0',NULL),(34,'2026-07-08 23:15:22',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(35,'2026-07-08 23:18:27',900,'gm',1,'fix','update','location_oo','1','{\"oo_status\":\"ok\"}','{\"oo_status\":\"ooo\",\"oo_reason\":\"Bocor pipa kamar mandi - TEST verifikasi\"}','127.0.0.1','curl/8.19.0',NULL),(36,'2026-07-08 23:19:07',900,'gm',1,'fix','update','location_oo','1','{\"oo_status\":\"ooo\"}','{\"oo_status\":\"ok\"}','127.0.0.1','curl/8.19.0',NULL),(37,'2026-07-08 23:50:06',900,'gm',1,'crew','create','hr_leaves','4',NULL,'{\"employee_id\":6,\"type_id\":3}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(38,'2026-07-08 23:50:26',900,'gm',1,'crew','approve','hr_leaves','2','{\"id\":2,\"property_id\":1,\"employee_id\":7,\"type_id\":3,\"from_date\":\"2026-07-14\",\"to_date\":\"2026-07-14\",\"reason\":\"Upacara odalan di banjar (tanggal DUMMY demo)\",\"doc_file\":null,\"status\":\"submitted\",\"approvals\":null,\"created_at\":\"2026-07-08 19:08:46\",\"updated_at\":\"2026-07-08 19:08:46\",\"full_name\":\"Ni Luh Made Satya Utami Putri\",\"department\":\"housekeeping\",\"type_name\":\"Ijin Adat Bali (odalan/ngaben/potong gigi)\",\"quota\":null,\"requires_gm\":0}','{\"status\":\"approved_spv\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(39,'2026-07-08 23:50:46',900,'gm',1,'crew','update','hr_tasks','9','{\"id\":9,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"di_po\",\"source_ref\":null,\"title\":\"Pengadaan sabun & shampo amenities kamar (DUMMY demo)\",\"description\":\"Stok amenities menipis, sudah diajukan PO ke purchasing (DUMMY demo — contoh journey procurement).\",\"department\":\"housekeeping\",\"assignee_id\":530,\"due_date\":\"2026-07-18\",\"priority\":\"normal\",\"status\":\"in_progress\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":5,\"verified_by\":null,\"created_at\":\"2026-07-08 23:34:49\",\"updated_at\":\"2026-07-08 23:34:49\"}','{\"current_stage\":\"indent\",\"status\":\"in_progress\"}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(40,'2026-07-08 23:51:14',900,'gm',1,'crew','update','hr_tasks','9','{\"id\":9,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"indent\",\"source_ref\":null,\"title\":\"Pengadaan sabun & shampo amenities kamar (DUMMY demo)\",\"description\":\"Stok amenities menipis, sudah diajukan PO ke purchasing (DUMMY demo — contoh journey procurement).\",\"department\":\"housekeeping\",\"assignee_id\":530,\"due_date\":\"2026-07-18\",\"priority\":\"normal\",\"status\":\"in_progress\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":5,\"verified_by\":null,\"created_at\":\"2026-07-08 23:34:49\",\"updated_at\":\"2026-07-08 23:50:46\"}','{\"current_stage\":\"barang_datang\",\"status\":\"in_progress\"}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(41,'2026-07-08 23:51:14',900,'gm',1,'crew','update','hr_tasks','9','{\"id\":9,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"barang_datang\",\"source_ref\":null,\"title\":\"Pengadaan sabun & shampo amenities kamar (DUMMY demo)\",\"description\":\"Stok amenities menipis, sudah diajukan PO ke purchasing (DUMMY demo — contoh journey procurement).\",\"department\":\"housekeeping\",\"assignee_id\":530,\"due_date\":\"2026-07-18\",\"priority\":\"normal\",\"status\":\"in_progress\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":5,\"verified_by\":null,\"created_at\":\"2026-07-08 23:34:49\",\"updated_at\":\"2026-07-08 23:51:14\"}','{\"current_stage\":\"diserahkan\",\"status\":\"done\"}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(42,'2026-07-08 23:51:15',900,'gm',1,'sell','update','hr_tasks','6',NULL,'{\"progress_note\":\"Kontrak tidak diperpanjang, mitra pindah (test verifikasi)\"}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(43,'2026-07-08 23:51:15',900,'gm',1,'sell','update','hr_tasks','6','{\"id\":6,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"sell\",\"kind\":\"staged\",\"journey_template\":\"contract_renewal\",\"current_stage\":\"reminder\",\"source_ref\":\"mkt_contracts:1\",\"title\":\"Reminder kontrak Contoh Travel Agent A H-60\",\"description\":\"Kontrak berakhir 45 hari lagi, siapkan opsi perpanjangan (DUMMY demo).\",\"department\":\"sales\",\"assignee_id\":520,\"due_date\":\"2026-07-15\",\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-08 19:08:46\",\"updated_at\":\"2026-07-08 23:34:49\"}','{\"status\":\"not_done\"}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(44,'2026-07-08 23:51:56',900,'gm',1,'crew','update','hr_tasks','10','{\"id\":10,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"source_ref\":null,\"title\":\"Cek kelengkapan amenities kamar checkout (DUMMY demo)\",\"description\":\"Contoh task instant departemen housekeeping yang otomatis tertaut ke indikator KPI \\\"Penyelesaian task tepat waktu\\\" (DUMMY demo ÔÇö kaitan KPI universal).\",\"department\":\"housekeeping\",\"assignee_id\":514,\"due_date\":\"2026-07-10\",\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":7,\"verified_by\":null,\"created_at\":\"2026-07-08 23:45:14\",\"updated_at\":\"2026-07-08 23:45:14\"}','{\"status\":\"done\",\"verified_by\":900}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(45,'2026-07-09 00:02:05',900,'gm',1,'crew','view_sensitive','hr_employees','16',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(46,'2026-07-09 05:11:56',900,'gm',1,'fix','export','assets',NULL,NULL,'{\"rows\":57}','::1','curl/8.19.0',NULL),(47,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(48,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','10',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(49,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','100',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(50,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','114',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(51,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(52,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','2',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(53,'2026-07-09 05:13:40',901,'hr_admin',1,'crew','view_sensitive','hr_employees','3',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(54,'2026-07-09 05:13:41',901,'hr_admin',1,'crew','view_sensitive','hr_employees','5',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(55,'2026-07-09 05:13:41',901,'hr_admin',1,'crew','view_sensitive','hr_employees','6',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(56,'2026-07-09 05:13:41',901,'hr_admin',1,'crew','view_sensitive','hr_employees','7',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(57,'2026-07-09 05:13:41',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(58,'2026-07-09 05:13:41',901,'hr_admin',1,'crew','view_sensitive','hr_employees','110',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(59,'2026-07-09 05:13:42',901,'hr_admin',1,'crew','view_sensitive','hr_employees','111',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(60,'2026-07-09 05:13:43',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(61,'2026-07-09 05:13:43',901,'hr_admin',1,'crew','view_sensitive','hr_employees','2',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(62,'2026-07-09 05:13:43',901,'hr_admin',1,'crew','view_sensitive','hr_employees','4',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(63,'2026-07-09 05:13:44',901,'hr_admin',1,'crew','view_sensitive','hr_employees','3',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(64,'2026-07-09 05:13:44',901,'hr_admin',1,'crew','view_sensitive','hr_employees','6',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(65,'2026-07-09 05:13:44',901,'hr_admin',1,'crew','view_sensitive','hr_employees','7',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(66,'2026-07-09 05:14:11',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(67,'2026-07-09 05:14:11',901,'hr_admin',1,'crew','view_sensitive','hr_employees','2',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(68,'2026-07-09 05:14:11',901,'hr_admin',1,'crew','view_sensitive','hr_employees','5',NULL,NULL,'127.0.0.1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(69,'2026-07-09 07:00:54',900,'gm',1,'sell','export','mkt_reservations',NULL,NULL,'{\"rows\":4}','127.0.0.1','curl/8.19.0',NULL),(70,'2026-07-09 07:01:07',900,'gm',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(71,'2026-07-09 07:01:35',900,'gm',1,'crew','view_sensitive','hr_employees','2',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(72,'2026-07-09 07:01:35',900,'gm',1,'crew','view_sensitive','hr_employees','4',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(73,'2026-07-09 07:01:35',900,'gm',1,'crew','view_sensitive','hr_employees','6',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(74,'2026-07-09 07:06:17',900,'gm',1,'crew','view_sensitive','hr_candidates','1',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(75,'2026-07-09 07:10:32',900,'gm',1,'crew','view_sensitive','hr_employees','95',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(76,'2026-07-09 07:10:33',900,'gm',1,'crew','view_sensitive','hr_candidates','1',NULL,NULL,'127.0.0.1','curl/8.19.0',NULL),(77,'2026-07-09 07:14:12',900,'gm',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":115}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(78,'2026-07-09 07:14:40',900,'gm',1,'fix','export','locations',NULL,NULL,'{\"rows\":25}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(79,'2026-07-09 07:14:40',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.26100.8737',NULL),(80,'2026-07-09 13:33:42',900,'gm',1,'crew','view_sensitive','hr_employees','12',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(81,'2026-07-09 13:37:59',900,'gm',1,'crew','view_sensitive','hr_employees','5',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(82,'2026-07-09 13:40:10',900,'gm',1,'crew','view_sensitive','hr_employees','12',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(83,'2026-07-09 13:53:53',3,'dept_head',1,'fix','create','asset_documents','3',NULL,'{}','::1','curl/8.19.0',NULL),(84,'2026-07-09 13:55:08',3,'dept_head',1,'fix','create','asset_documents','4',NULL,'{\"asset_id\":1,\"type\":\"manual\",\"title\":\"THROWAWAY TEST DELETE\",\"file\":\"asset_documents/1/44e30c6504a6a303acf53d487560a8cb.pdf\",\"expiry_date\":null,\"reminder_days\":30}','::1','curl/8.19.0',NULL),(85,'2026-07-09 13:55:24',3,'dept_head',1,'fix','delete','asset_documents','4','{\"id\":4,\"asset_id\":1,\"type\":\"manual\",\"title\":\"THROWAWAY TEST DELETE\",\"file\":\"asset_documents/1/44e30c6504a6a303acf53d487560a8cb.pdf\",\"expiry_date\":null,\"reminder_days\":30,\"created_at\":\"2026-07-09 13:55:08\",\"updated_at\":\"2026-07-09 13:55:08\"}',NULL,'::1','curl/8.19.0',NULL),(86,'2026-07-09 13:56:45',901,'hr_admin',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":4}','127.0.0.1',NULL,NULL),(87,'2026-07-09 13:57:12',901,'hr_admin',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":12}','127.0.0.1',NULL,NULL),(88,'2026-07-09 13:57:12',901,'hr_admin',1,'crew','export','hr_courses',NULL,NULL,'{\"rows\":13}','127.0.0.1',NULL,NULL),(89,'2026-07-09 14:06:09',900,'gm',1,'crew','export','hr_tasks',NULL,NULL,'{\"rows\":4}','127.0.0.1','curl/8.19.0',NULL),(90,'2026-07-09 14:10:27',901,'hr_admin',1,'crew','view_sensitive','hr_employees','4',NULL,NULL,'127.0.0.1',NULL,NULL),(91,'2026-07-09 14:48:50',900,'gm',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(92,'2026-07-09 15:14:16',900,'gm',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'::1','curl/8.19.0',NULL),(93,'2026-07-09 15:15:34',900,'gm',1,'crew','view_sensitive','hr_employees','27',NULL,NULL,'::1','curl/8.19.0',NULL),(94,'2026-07-09 15:21:08',905,'employee',1,'crew','create','hr_tasks','11',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"complaint:4\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":7,\"title\":\"Tindak lanjuti komplain #4 (High)\",\"description\":\"QC TEST - handuk kotor tidak diganti, tamu marah.\",\"department\":\"housekeeping\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(95,'2026-07-09 15:23:06',900,'gm',1,'crew','update','hr_complaints','4','{\"id\":4,\"property_id\":1,\"source\":\"guest\",\"channel\":\"langsung\",\"guest_name\":\"QC Test Guest\",\"room\":\"305\",\"department\":\"housekeeping\",\"category\":\"kebersihan\",\"severity\":\"high\",\"description\":\"QC TEST - handuk kotor tidak diganti, tamu marah.\",\"status\":\"open\",\"resolution\":null,\"reported_by\":905,\"resolved_by\":null,\"created_at\":\"2026-07-09 15:21:08\",\"resolved_at\":null,\"updated_at\":\"2026-07-09 15:21:08\",\"department_id\":6,\"department_label\":\"Housekeeping\",\"reported_by_name\":\"[QC] Demo Karyawan\",\"reported_by_employee_id\":111,\"resolved_by_name\":null}','{\"status\":\"resolved\",\"resolution\":\"QC TEST - housekeeping sudah mengganti handuk, tamu diberi kompensasi.\"}','127.0.0.1','curl/8.19.0',NULL),(96,'2026-07-09 15:23:53',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":8}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(97,'2026-07-09 15:23:54',900,'gm',1,'crew','create','hr_tasks','12',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"complaint:5\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"Tindak lanjuti komplain #5 (Medium)\",\"description\":\"QC TEST medium severity - proses checkout agak lama.\",\"department\":\"front_office\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"high\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(98,'2026-07-09 15:24:06',900,'gm',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":115}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(99,'2026-07-09 15:24:14',900,'gm',1,'crew','export','hr_complaints',NULL,NULL,'{\"rows\":5}','127.0.0.1','curl/8.19.0',NULL),(100,'2026-07-09 15:32:12',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','curl/8.19.0',NULL),(101,'2026-07-09 15:33:06',900,'gm',1,'crew','export','hr_employees',NULL,NULL,'{\"rows\":115}','::1','curl/8.19.0',NULL),(102,'2026-07-09 15:33:06',900,'gm',1,'sell','export','mkt_partners',NULL,NULL,'{\"rows\":3}','::1','curl/8.19.0',NULL),(103,'2026-07-09 15:33:32',900,'gm',1,'fix','export','work_orders',NULL,NULL,'{\"rows\":55}','::1','curl/8.19.0',NULL),(104,'2026-07-09 15:56:12',900,'gm',1,'crew','view_sensitive','hr_employees','114',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(105,'2026-07-09 16:03:16',900,'gm',1,'crew','approve','hr_leaves','2','{\"id\":2,\"property_id\":1,\"employee_id\":7,\"type_id\":3,\"from_date\":\"2026-07-14\",\"to_date\":\"2026-07-14\",\"reason\":\"Upacara odalan di banjar (tanggal DUMMY demo)\",\"doc_file\":null,\"status\":\"approved_spv\",\"approvals\":\"{\\\"spv\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-08 23:50:26\\\"}}\",\"created_at\":\"2026-07-08 19:08:46\",\"updated_at\":\"2026-07-08 23:50:26\",\"full_name\":\"Ni Luh Made Satya Utami Putri\",\"department\":\"housekeeping\",\"type_name\":\"Ijin Adat Bali (odalan/ngaben/potong gigi)\",\"quota\":null,\"requires_gm\":0}','{\"status\":\"approved_hod\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(106,'2026-07-09 16:04:02',900,'gm',1,'crew','create','hr_leaves','5',NULL,'{\"employee_id\":106,\"type_id\":1}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(107,'2026-07-09 16:04:07',900,'gm',1,'crew','approve','hr_leaves','5','{\"id\":5,\"property_id\":1,\"employee_id\":106,\"type_id\":1,\"from_date\":\"2026-07-16\",\"to_date\":\"2026-07-18\",\"reason\":\"urusan keluarga\",\"doc_file\":null,\"status\":\"submitted\",\"approvals\":null,\"created_at\":\"2026-07-09 16:04:02\",\"updated_at\":\"2026-07-09 16:04:02\",\"full_name\":\"[QC] Demo GM\",\"department\":\"\",\"type_name\":\"Cuti Tahunan\",\"quota\":12,\"requires_gm\":0}','{\"status\":\"approved_spv\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(108,'2026-07-09 16:04:11',900,'gm',1,'crew','approve','hr_leaves','5','{\"id\":5,\"property_id\":1,\"employee_id\":106,\"type_id\":1,\"from_date\":\"2026-07-16\",\"to_date\":\"2026-07-18\",\"reason\":\"urusan keluarga\",\"doc_file\":null,\"status\":\"approved_spv\",\"approvals\":\"{\\\"spv\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-09 16:04:07\\\"}}\",\"created_at\":\"2026-07-09 16:04:02\",\"updated_at\":\"2026-07-09 16:04:07\",\"full_name\":\"[QC] Demo GM\",\"department\":\"\",\"type_name\":\"Cuti Tahunan\",\"quota\":12,\"requires_gm\":0}','{\"status\":\"approved_hod\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(109,'2026-07-09 16:04:13',900,'gm',1,'crew','create','hr_tasks','13',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_leaves:5\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"Cuti disetujui: Cuti Tahunan\",\"description\":\"Pengajuan 2026-07-16 s/d 2026-07-18 telah disetujui.\",\"department\":\"\",\"assignee_id\":900,\"due_date\":\"2026-07-16\",\"priority\":\"low\",\"status\":\"open\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(110,'2026-07-09 16:04:13',900,'gm',1,'crew','approve','hr_leaves','5','{\"id\":5,\"property_id\":1,\"employee_id\":106,\"type_id\":1,\"from_date\":\"2026-07-16\",\"to_date\":\"2026-07-18\",\"reason\":\"urusan keluarga\",\"doc_file\":null,\"status\":\"approved_hod\",\"approvals\":\"{\\\"spv\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-09 16:04:07\\\"},\\\"hod\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-09 16:04:11\\\"}}\",\"created_at\":\"2026-07-09 16:04:02\",\"updated_at\":\"2026-07-09 16:04:11\",\"full_name\":\"[QC] Demo GM\",\"department\":\"\",\"type_name\":\"Cuti Tahunan\",\"quota\":12,\"requires_gm\":0}','{\"status\":\"approved_hr\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(111,'2026-07-09 16:04:15',900,'gm',1,'crew','create','hr_tasks','14',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_leaves:5\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"Cuti disetujui: Cuti Tahunan\",\"description\":\"Pengajuan 2026-07-16 s/d 2026-07-18 telah disetujui.\",\"department\":\"\",\"assignee_id\":900,\"due_date\":\"2026-07-16\",\"priority\":\"low\",\"status\":\"open\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(112,'2026-07-09 16:04:15',900,'gm',1,'crew','approve','hr_leaves','5','{\"id\":5,\"property_id\":1,\"employee_id\":106,\"type_id\":1,\"from_date\":\"2026-07-16\",\"to_date\":\"2026-07-18\",\"reason\":\"urusan keluarga\",\"doc_file\":null,\"status\":\"approved_hr\",\"approvals\":\"{\\\"spv\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-09 16:04:07\\\"},\\\"hod\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-09 16:04:11\\\"},\\\"hr\\\":{\\\"by\\\":900,\\\"at\\\":\\\"2026-07-09 16:04:13\\\"}}\",\"created_at\":\"2026-07-09 16:04:02\",\"updated_at\":\"2026-07-09 16:04:13\",\"full_name\":\"[QC] Demo GM\",\"department\":\"\",\"type_name\":\"Cuti Tahunan\",\"quota\":12,\"requires_gm\":0}','{\"status\":\"approved_gm\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(113,'2026-07-09 16:04:30',900,'gm',1,'crew','view_sensitive','hr_employees','106',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(114,'2026-07-09 16:09:02',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'::1','curl/8.20.0',NULL),(115,'2026-07-09 16:09:02',901,'hr_admin',1,'crew','create','hr_documents','3',NULL,'{\"employee_id\":1,\"title\":\"UAT Upload Test - DUMMY\"}','::1','curl/8.20.0',NULL),(116,'2026-07-09 16:13:21',900,'gm',1,'crew','view_sensitive','hr_employees','106',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(117,'2026-07-09 16:13:45',900,'gm',1,'crew','create','hr_documents','4',NULL,'{\"employee_id\":106,\"title\":\"ktp\"}','::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(118,'2026-07-09 16:13:45',900,'gm',1,'crew','view_sensitive','hr_employees','106',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(119,'2026-07-09 16:17:25',900,'gm',1,'crew','update','hr_lost_found','5','{\"id\":5,\"property_id\":1,\"item\":\"Topi pantai biru (QC test verifikasi)\",\"photo\":null,\"location_id\":1,\"found_by\":905,\"stored_at\":\"Meja depan security\",\"returned_to\":null,\"status\":\"stored\",\"created_at\":\"2026-07-09 16:16:37\",\"updated_at\":\"2026-07-09 16:16:37\",\"location_name\":\"Kamar 1201\",\"found_by_employee_id\":111,\"found_by_name\":\"[QC] Demo Karyawan\"}','{\"status\":\"claimed\",\"returned_to\":\"Tamu Kamar 1201 (QC verifikasi)\"}','127.0.0.1','curl/8.19.0',NULL),(120,'2026-07-09 16:17:56',900,'gm',1,'crew','export','hr_lost_found',NULL,NULL,'{\"rows\":5}','127.0.0.1','curl/8.19.0',NULL),(121,'2026-07-09 16:23:22',900,'gm',1,'crew','view_sensitive','hr_employees','106',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0',NULL),(122,'2026-07-09 16:27:55',901,'hr_admin',1,'crew','view_sensitive','hr_employees','1',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(123,'2026-07-09 16:28:44',905,'employee',1,'crew','create','inv_requests','3',NULL,'{\"department\":\"fnb\",\"lines\":2}','127.0.0.1','curl/8.19.0',NULL),(124,'2026-07-09 16:28:44',905,'employee',1,'crew','create','hr_tasks','15',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"request:3\",\"source\":\"manual\",\"kind\":\"staged\",\"journey_template\":\"daily_request\",\"current_stage\":\"diajukan\",\"kpi_definition_id\":null,\"title\":\"Daily request #3 — fnb\",\"description\":\"2 item diminta. Siapkan, serahkan, lalu tandai selesai.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(125,'2026-07-09 16:28:44',900,'gm',1,'crew','update','hr_tasks','15','{\"id\":15,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"daily_request\",\"current_stage\":\"diajukan\",\"source_ref\":\"request:3\",\"title\":\"Daily request #3 — fnb\",\"description\":\"2 item diminta. Siapkan, serahkan, lalu tandai selesai.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:28:44\",\"updated_at\":\"2026-07-09 16:28:44\"}','{\"current_stage\":\"disiapkan\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(126,'2026-07-09 16:28:44',900,'gm',1,'crew','update','inv_requests','3','{\"id\":3,\"property_id\":1,\"department\":\"fnb\",\"request_date\":\"2026-07-09\",\"status\":\"diajukan\",\"requested_by\":905,\"handled_by\":null,\"note\":\"VERIFY end-to-end\",\"created_at\":\"2026-07-09 16:28:44\",\"updated_at\":\"2026-07-09 16:28:44\",\"department_id\":4,\"department_label\":\"F&B\",\"requested_by_name\":\"[QC] Demo Karyawan\",\"handled_by_name\":null}','{\"status\":\"disiapkan\"}','127.0.0.1','curl/8.19.0',NULL),(127,'2026-07-09 16:28:45',900,'gm',1,'crew','update','hr_tasks','15','{\"id\":15,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"daily_request\",\"current_stage\":\"disiapkan\",\"source_ref\":\"request:3\",\"title\":\"Daily request #3 — fnb\",\"description\":\"2 item diminta. Siapkan, serahkan, lalu tandai selesai.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:28:44\",\"updated_at\":\"2026-07-09 16:28:44\"}','{\"current_stage\":\"diserahkan\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(128,'2026-07-09 16:28:45',900,'gm',1,'crew','update','inv_requests','3','{\"id\":3,\"property_id\":1,\"department\":\"fnb\",\"request_date\":\"2026-07-09\",\"status\":\"disiapkan\",\"requested_by\":905,\"handled_by\":900,\"note\":\"VERIFY end-to-end\",\"created_at\":\"2026-07-09 16:28:44\",\"updated_at\":\"2026-07-09 16:28:44\",\"department_id\":4,\"department_label\":\"F&B\",\"requested_by_name\":\"[QC] Demo Karyawan\",\"handled_by_name\":\"[QC] Demo GM\"}','{\"status\":\"diserahkan\"}','127.0.0.1','curl/8.19.0',NULL),(129,'2026-07-09 16:28:45',900,'gm',1,'crew','update','hr_tasks','15','{\"id\":15,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"daily_request\",\"current_stage\":\"diserahkan\",\"source_ref\":\"request:3\",\"title\":\"Daily request #3 — fnb\",\"description\":\"2 item diminta. Siapkan, serahkan, lalu tandai selesai.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:28:44\",\"updated_at\":\"2026-07-09 16:28:45\"}','{\"current_stage\":\"selesai\",\"status\":\"done\"}','127.0.0.1','curl/8.19.0',NULL),(130,'2026-07-09 16:28:45',900,'gm',1,'crew','update','inv_requests','3','{\"id\":3,\"property_id\":1,\"department\":\"fnb\",\"request_date\":\"2026-07-09\",\"status\":\"diserahkan\",\"requested_by\":905,\"handled_by\":900,\"note\":\"VERIFY end-to-end\",\"created_at\":\"2026-07-09 16:28:44\",\"updated_at\":\"2026-07-09 16:28:45\",\"department_id\":4,\"department_label\":\"F&B\",\"requested_by_name\":\"[QC] Demo Karyawan\",\"handled_by_name\":\"[QC] Demo GM\"}','{\"status\":\"selesai\"}','127.0.0.1','curl/8.19.0',NULL),(131,'2026-07-09 16:28:45',900,'gm',1,'crew','create','inv_opnames','3',NULL,'{\"department\":\"fnb\",\"storage\":\"Gudang F&B VERIFY\"}','127.0.0.1','curl/8.19.0',NULL),(132,'2026-07-09 16:28:45',900,'gm',1,'crew','create','hr_tasks','16',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"opname:3\",\"source\":\"manual\",\"kind\":\"staged\",\"journey_template\":\"stock_opname\",\"current_stage\":\"counting\",\"kpi_definition_id\":null,\"title\":\"Stock opname #3 — fnb\",\"description\":\"Hitung fisik gudang (Gudang F&B VERIFY), review, lalu tutup.\",\"department\":\"fnb\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(133,'2026-07-09 16:28:46',900,'gm',1,'crew','update','inv_opnames','3',NULL,'{\"action\":\"save_counts\"}','127.0.0.1','curl/8.19.0',NULL),(134,'2026-07-09 16:28:46',900,'gm',1,'crew','update','hr_tasks','16','{\"id\":16,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"stock_opname\",\"current_stage\":\"counting\",\"source_ref\":\"opname:3\",\"title\":\"Stock opname #3 — fnb\",\"description\":\"Hitung fisik gudang (Gudang F&B VERIFY), review, lalu tutup.\",\"department\":\"fnb\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:28:45\",\"updated_at\":\"2026-07-09 16:28:45\"}','{\"current_stage\":\"review\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(135,'2026-07-09 16:28:46',900,'gm',1,'crew','update','inv_opnames','3','{\"id\":3,\"property_id\":1,\"department\":\"fnb\",\"storage\":\"Gudang F&B VERIFY\",\"status\":\"counting\",\"created_by\":900,\"closed_by\":null,\"created_at\":\"2026-07-09 16:28:45\",\"closed_at\":null,\"department_id\":4,\"department_label\":\"F&B\",\"created_by_name\":\"[QC] Demo GM\",\"closed_by_name\":null}','{\"status\":\"review\"}','127.0.0.1','curl/8.19.0',NULL),(136,'2026-07-09 16:28:46',900,'gm',1,'crew','update','hr_tasks','16','{\"id\":16,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"stock_opname\",\"current_stage\":\"review\",\"source_ref\":\"opname:3\",\"title\":\"Stock opname #3 — fnb\",\"description\":\"Hitung fisik gudang (Gudang F&B VERIFY), review, lalu tutup.\",\"department\":\"fnb\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:28:45\",\"updated_at\":\"2026-07-09 16:28:46\"}','{\"current_stage\":\"closed\",\"status\":\"done\"}','127.0.0.1','curl/8.19.0',NULL),(137,'2026-07-09 16:28:46',900,'gm',1,'crew','update','inv_opnames','3','{\"id\":3,\"property_id\":1,\"department\":\"fnb\",\"storage\":\"Gudang F&B VERIFY\",\"status\":\"review\",\"created_by\":900,\"closed_by\":null,\"created_at\":\"2026-07-09 16:28:45\",\"closed_at\":null,\"department_id\":4,\"department_label\":\"F&B\",\"created_by_name\":\"[QC] Demo GM\",\"closed_by_name\":null}','{\"status\":\"closed\",\"diff_lines\":1}','127.0.0.1','curl/8.19.0',NULL),(138,'2026-07-09 16:28:46',900,'gm',1,'crew','create','hr_tasks','17',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"opname:3\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"Tindak lanjut selisih opname #3\",\"description\":\"1 item berselisih pada opname #3 — telusuri penyebab & perbaiki proses.\",\"department\":\"fnb\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"high\",\"status\":\"open\"}','127.0.0.1','curl/8.19.0',NULL),(139,'2026-07-09 16:28:47',900,'gm',1,'crew','export','inv_items',NULL,NULL,'{\"rows\":12}','127.0.0.1','curl/8.19.0',NULL),(140,'2026-07-09 16:50:43',905,'employee',1,'crew','create','hr_tasks','18',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"pr:3\",\"source\":\"manual\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"diminta\",\"kpi_definition_id\":null,\"title\":\"Permintaan pembelian #3 — VERIFY8153 PR pompa\",\"description\":\"2 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\"}','::1','curl/8.19.0',NULL),(141,'2026-07-09 16:51:07',900,'gm',1,'crew','update','hr_tasks','18','{\"id\":18,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"diminta\",\"source_ref\":\"pr:3\",\"title\":\"Permintaan pembelian #3 — VERIFY8153 PR pompa\",\"description\":\"2 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:50:43\",\"updated_at\":\"2026-07-09 16:50:43\"}','{\"current_stage\":\"di_po\",\"status\":\"open\"}','::1','curl/8.19.0',NULL),(143,'2026-07-09 16:51:07',900,'gm',1,'crew','update','hr_tasks','18','{\"id\":18,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"di_po\",\"source_ref\":\"pr:3\",\"title\":\"Permintaan pembelian #3 — VERIFY8153 PR pompa\",\"description\":\"2 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:50:43\",\"updated_at\":\"2026-07-09 16:51:07\"}','{\"current_stage\":\"indent\",\"status\":\"open\"}','::1','curl/8.19.0',NULL),(145,'2026-07-09 16:51:07',900,'gm',1,'crew','update','hr_tasks','18','{\"id\":18,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"indent\",\"source_ref\":\"pr:3\",\"title\":\"Permintaan pembelian #3 — VERIFY8153 PR pompa\",\"description\":\"2 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:50:43\",\"updated_at\":\"2026-07-09 16:51:07\"}','{\"current_stage\":\"barang_datang\",\"status\":\"open\"}','::1','curl/8.19.0',NULL),(147,'2026-07-09 16:51:08',900,'gm',1,'crew','update','hr_tasks','18','{\"id\":18,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"barang_datang\",\"source_ref\":\"pr:3\",\"title\":\"Permintaan pembelian #3 — VERIFY8153 PR pompa\",\"description\":\"2 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:50:43\",\"updated_at\":\"2026-07-09 16:51:07\"}','{\"current_stage\":\"diserahkan\",\"status\":\"done\"}','::1','curl/8.19.0',NULL),(150,'2026-07-09 16:51:58',905,'employee',1,'crew','create','hr_tasks','19',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"pr:4\",\"source\":\"manual\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"diminta\",\"kpi_definition_id\":null,\"title\":\"Permintaan pembelian #4 — VERIFY8153 PR reject\",\"description\":\"1 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\"}','::1','curl/8.19.0',NULL),(151,'2026-07-09 16:51:58',900,'gm',1,'crew','update','hr_tasks','19',NULL,'{\"progress_note\":\"stok masih ada\"}','::1','curl/8.19.0',NULL),(152,'2026-07-09 16:51:58',900,'gm',1,'crew','update','hr_tasks','19','{\"id\":19,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"staged\",\"journey_template\":\"procurement\",\"current_stage\":\"diminta\",\"source_ref\":\"pr:4\",\"title\":\"Permintaan pembelian #4 — VERIFY8153 PR reject\",\"description\":\"1 item diminta. Proses: di-PO -> indent -> barang datang -> diserahkan.\",\"department\":\"finance\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":null,\"verified_by\":null,\"created_at\":\"2026-07-09 16:51:58\",\"updated_at\":\"2026-07-09 16:51:58\"}','{\"status\":\"not_done\"}','::1','curl/8.19.0',NULL),(154,'2026-07-09 16:53:37',910,'property_admin',1,'fix','create','laundry_handovers','4',NULL,'{\"vendor_id\":1,\"lines\":3}','::1','curl/8.19.0',NULL),(155,'2026-07-09 16:56:38',910,'property_admin',1,'fix','update','laundry_handovers','4','{\"id\":4,\"property_id\":1,\"vendor_id\":1,\"sent_at\":\"2026-07-09 16:53:37\",\"expected_return_date\":\"2026-07-15\",\"received_at\":null,\"status\":\"dikirim\",\"notes\":\"DUMMY - verifikasi object-creator laundry\",\"created_by\":910,\"created_at\":\"2026-07-09 16:53:37\",\"updated_at\":\"2026-07-09 16:53:37\",\"vendor_name\":\"CV Sejahtera Teknik\",\"created_by_name\":\"[QC] Demo Property Admin (laundry verify, DUMMY)\"}','{\"status\":\"ada_klaim\"}','::1','curl/8.19.0',NULL),(156,'2026-07-09 16:56:39',NULL,NULL,NULL,'crew','create','hr_tasks','20',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_task_template:1\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":7,\"title\":\"Cek kelengkapan & kebersihan stok linen tiap shift (DUMMY demo)\",\"description\":\"Supervisor housekeeping memeriksa stok linen (sheet, towel, pillowcase) awal shift; catat kekurangan (DUMMY demo — tugas rutin harian).\",\"department\":\"housekeeping\",\"assignee_id\":null,\"due_date\":\"2026-07-10\",\"priority\":\"normal\",\"status\":\"open\"}','0.0.0.0',NULL,NULL),(157,'2026-07-09 16:56:39',NULL,NULL,NULL,'crew','create','hr_tasks','21',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_task_template:2\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"Cek stok amenity & perlengkapan front desk tiap pagi (DUMMY demo)\",\"description\":\"Resepsionis memeriksa stok amenity welcome drink, form, kartu kunci setiap pagi; ajukan permintaan bila menipis (DUMMY demo — tugas rutin harian).\",\"department\":\"front_office\",\"assignee_id\":null,\"due_date\":\"2026-07-10\",\"priority\":\"low\",\"status\":\"open\"}','0.0.0.0',NULL,NULL),(158,'2026-07-09 16:56:39',NULL,NULL,NULL,'crew','create','hr_tasks','22',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_task_template:3\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":7,\"title\":\"[VERIFY-DUMMY] Cek stok amenity harian qc.employee\",\"description\":\"Task uji generator tugas rutin (VERIFY-DUMMY).\",\"department\":\"housekeeping\",\"assignee_id\":905,\"due_date\":\"2026-07-10\",\"priority\":\"normal\",\"status\":\"open\"}','0.0.0.0',NULL,NULL),(159,'2026-07-09 16:57:05',900,'gm',1,'fix','update','asset_custody','2','{\"id\":2,\"property_id\":1,\"asset_id\":21,\"employee_id\":1,\"purpose\":\"DUMMY — belanja keperluan operasional ke kota\",\"checkout_at\":\"2026-07-07 16:46:28\",\"expected_return_date\":\"2026-07-10\",\"returned_at\":null,\"condition_out\":\"DUMMY — kondisi baik, BBM full, tidak ada lecet\",\"condition_in\":null,\"odometer_out\":45210,\"odometer_in\":null,\"status\":\"dipegang\",\"created_by\":1,\"notes\":\"DUMMY — seed asset-custody (0028)\",\"created_at\":\"2026-07-09 16:46:28\",\"updated_at\":\"2026-07-09 16:46:28\",\"asset_name\":\"Mobil Operasional Avanza\",\"asset_code\":\"AST-000021\",\"employee_name\":\"I Putu Ngurah Sanglah\"}','{\"status\":\"dikembalikan\",\"condition_in\":\"DUMMY - kondisi baik, BBM 3/4, tidak ada lecet baru\",\"odometer_in\":45260}','::1','curl/8.19.0',NULL),(160,'2026-07-09 16:57:19',900,'gm',1,'fix','create','asset_custody','3',NULL,'{\"asset_id\":21,\"employee_id\":3,\"purpose\":\"DUMMY QC - test checkout via curl\"}','::1','curl/8.19.0',NULL),(161,'2026-07-09 16:57:25',910,'property_admin',1,'fix','update','laundry_handover_items','11',NULL,'{\"claim_status\":\"diajukan\"}','::1','curl/8.19.0',NULL),(162,'2026-07-09 16:57:38',900,'gm',1,'fix','update','asset_custody','3','{\"id\":3,\"property_id\":1,\"asset_id\":21,\"employee_id\":3,\"purpose\":\"DUMMY QC - test checkout via curl\",\"checkout_at\":\"2026-07-09 16:57:19\",\"expected_return_date\":\"2026-07-12\",\"returned_at\":null,\"condition_out\":\"DUMMY - kondisi baik saat checkout test\",\"condition_in\":null,\"odometer_out\":45260,\"odometer_in\":null,\"status\":\"dipegang\",\"created_by\":900,\"notes\":null,\"created_at\":\"2026-07-09 16:57:19\",\"updated_at\":\"2026-07-09 16:57:19\",\"asset_name\":\"Mobil Operasional Avanza\",\"asset_code\":\"AST-000021\",\"employee_name\":\"I Wayan Arsa Wijaya\"}','{\"status\":\"dikembalikan\",\"condition_in\":\"DUMMY - dikembalikan (cleanup test)\",\"odometer_in\":null}','::1','curl/8.19.0',NULL),(163,'2026-07-09 16:58:34',900,'gm',1,'crew','create','hr_tasks','23',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_task_template:1\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":7,\"title\":\"Cek kelengkapan & kebersihan stok linen tiap shift (DUMMY demo)\",\"description\":\"Supervisor housekeeping memeriksa stok linen (sheet, towel, pillowcase) awal shift; catat kekurangan (DUMMY demo — tugas rutin harian).\",\"department\":\"housekeeping\",\"assignee_id\":null,\"due_date\":\"2026-07-09\",\"priority\":\"normal\",\"status\":\"open\"}','::1',NULL,NULL),(164,'2026-07-09 16:58:34',900,'gm',1,'crew','create','hr_tasks','24',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_task_template:2\",\"source\":\"manual\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"Cek stok amenity & perlengkapan front desk tiap pagi (DUMMY demo)\",\"description\":\"Resepsionis memeriksa stok amenity welcome drink, form, kartu kunci setiap pagi; ajukan permintaan bila menipis (DUMMY demo — tugas rutin harian).\",\"department\":\"front_office\",\"assignee_id\":null,\"due_date\":\"2026-07-09\",\"priority\":\"low\",\"status\":\"open\"}','::1',NULL,NULL),(165,'2026-07-09 16:59:48',900,'gm',1,'crew','view_sensitive','hr_employees','114',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(166,'2026-07-09 16:59:57',900,'gm',1,'crew','view_sensitive','hr_employees','3',NULL,NULL,'::1','curl/8.19.0',NULL),(167,'2026-07-09 17:00:09',901,'hr_admin',1,'crew','view_sensitive','hr_employees','3',NULL,NULL,'::1','curl/8.19.0',NULL),(168,'2026-07-09 17:05:36',902,'hr_staff',1,'crew','view_sensitive','hr_candidates','3',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(169,'2026-07-09 17:07:53',NULL,NULL,NULL,'crew','create','hr_tasks','25',NULL,'{\"property_id\":1,\"source_app\":\"crew\",\"source_ref\":\"hr_briefing_items:4\",\"source\":\"briefing\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"kpi_definition_id\":null,\"title\":\"DUMMY QC cascade: 26 overdue SLA, 4 defect kritis (urgent) belum ditutup — cek\",\"description\":\"26 overdue SLA, 4 defect kritis (urgent) belum ditutup — cek Work Order.\",\"department\":null,\"assignee_id\":null,\"due_date\":null,\"priority\":\"normal\",\"status\":\"open\"}','0.0.0.0',NULL,NULL),(170,'2026-07-09 17:09:16',NULL,'supervisor',1,'crew','create','fo_night_audit_reports','2',NULL,'{\"report_date\":\"2026-07-05\"}','::1','curl/8.19.0',NULL),(171,'2026-07-09 17:10:23',900,'gm',1,'crew','view_sensitive','hr_employees','114',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(172,'2026-07-09 17:11:00',900,'gm',1,'crew','view_sensitive','hr_employees','89',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(173,'2026-07-09 17:11:00',900,'gm',1,'crew','view_sensitive','hr_employees','84',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(174,'2026-07-09 17:11:00',900,'gm',1,'crew','view_sensitive','hr_employees','51',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(175,'2026-07-09 17:11:00',900,'gm',1,'crew','view_sensitive','hr_employees','22',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(176,'2026-07-09 17:11:00',900,'gm',1,'crew','view_sensitive','hr_employees','8',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(177,'2026-07-09 17:11:08',900,'gm',1,'crew','view_sensitive','hr_employees','8',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(178,'2026-07-09 17:11:39',900,'gm',1,'crew','view_sensitive','hr_employees','8',NULL,NULL,'::1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Claude/1.19367.0 Chrome/148.0.7778.271 Electron/42.5.1 Safari/537.36 MSIX',NULL),(179,'2026-07-10 10:00:22',905,'employee',1,'crew','update','hr_tasks','11','{\"id\":11,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"source_ref\":\"complaint:4\",\"title\":\"Tindak lanjuti komplain #4 (High)\",\"description\":\"QC TEST - handuk kotor tidak diganti, tamu marah.\",\"department\":\"housekeeping\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":7,\"verified_by\":null,\"created_at\":\"2026-07-09 15:21:08\",\"updated_at\":\"2026-07-09 15:21:08\"}','{\"assignee_id\":905,\"via\":\"self_claim\"}','::1','curl/8.19.0',NULL),(180,'2026-07-10 10:00:45',905,'employee',1,'crew','update','hr_tasks','11','{\"id\":11,\"property_id\":1,\"source\":\"manual\",\"source_app\":\"crew\",\"kind\":\"instant\",\"journey_template\":null,\"current_stage\":null,\"source_ref\":\"complaint:4\",\"title\":\"Tindak lanjuti komplain #4 (High)\",\"description\":\"QC TEST - handuk kotor tidak diganti, tamu marah.\",\"department\":\"housekeeping\",\"assignee_id\":null,\"due_date\":null,\"priority\":\"urgent\",\"status\":\"open\",\"progress_notes\":null,\"hotelfix_wo_id\":null,\"kpi_definition_id\":7,\"verified_by\":null,\"created_at\":\"2026-07-09 15:21:08\",\"updated_at\":\"2026-07-10 10:00:45\"}','{\"assignee_id\":905,\"via\":\"self_claim\"}','::1','curl/8.19.0',NULL),(181,'2026-07-10 14:48:32',NULL,NULL,NULL,'crew','create','hr_guest_imports','2',NULL,'{\"date\":\"2099-01-01\",\"rows\":54,\"format\":\"xlsx\"}','0.0.0.0',NULL,NULL),(182,'2026-07-10 14:51:44',NULL,NULL,NULL,'crew','create','hr_guest_imports','3',NULL,'{\"date\":\"2099-01-01\",\"rows\":52,\"format\":\"xlsx\"}','0.0.0.0',NULL,NULL),(183,'2026-07-10 14:52:19',NULL,NULL,NULL,'crew','create','hr_guest_imports','4',NULL,'{\"date\":\"2099-01-01\",\"rows\":52,\"format\":\"xlsx\"}','0.0.0.0',NULL,NULL),(184,'2026-07-10 14:56:19',900,'gm',1,'crew','create','hr_guest_imports','5',NULL,'{\"date\":\"2099-03-01\",\"rows\":52,\"format\":\"xlsx\"}','::1','curl/8.19.0',NULL),(185,'2026-07-10 14:56:19',900,'gm',1,'crew','create','fo_night_audit_reports','6',NULL,'{\"report_date\":\"2026-07-09\",\"via\":\"import-hub\"}','::1','curl/8.19.0',NULL);

--
-- Table structure for table `broadcast_receipts`
--

CREATE TABLE `broadcast_receipts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `broadcast_id` bigint(20) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `delivered_at` datetime DEFAULT NULL,
  `read_at` datetime DEFAULT NULL,
  `ack_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_broadcast_receipts_broadcast_user` (`broadcast_id`,`user_id`),
  KEY `idx_broadcast_receipts_user` (`user_id`),
  CONSTRAINT `fk_broadcast_receipts_broadcast` FOREIGN KEY (`broadcast_id`) REFERENCES `broadcasts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_broadcast_receipts_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=121 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `broadcast_receipts`
--

INSERT INTO `broadcast_receipts` VALUES (1,1,5,'2026-07-08 16:59:09','2026-07-08 17:17:09','2026-07-08 17:22:09'),(2,1,6,'2026-07-08 16:59:09','2026-07-08 17:57:09',NULL),(3,2,3,'2026-07-07 19:57:09','2026-07-07 20:57:09',NULL),(4,2,4,'2026-07-07 19:57:09','2026-07-07 22:57:09',NULL),(5,2,5,'2026-07-07 19:57:09',NULL,NULL),(6,2,6,'2026-07-07 19:57:09','2026-07-08 00:57:09',NULL),(7,3,1,'2026-07-09 13:55:01',NULL,NULL),(8,3,2,'2026-07-09 13:55:01',NULL,NULL),(9,3,3,'2026-07-09 13:55:01',NULL,NULL),(10,3,4,'2026-07-09 13:55:01',NULL,NULL),(11,3,5,'2026-07-09 13:55:01',NULL,NULL),(12,3,6,'2026-07-09 13:55:01',NULL,NULL),(13,3,7,'2026-07-09 13:55:01',NULL,NULL),(14,3,8,'2026-07-09 13:55:01',NULL,NULL),(15,3,9,'2026-07-09 13:55:01',NULL,NULL),(16,3,10,'2026-07-09 13:55:01',NULL,NULL),(17,3,11,'2026-07-09 13:55:01',NULL,NULL),(18,3,12,'2026-07-09 13:55:01',NULL,NULL),(19,3,13,'2026-07-09 13:55:01',NULL,NULL),(20,3,501,'2026-07-09 13:55:01',NULL,NULL),(21,3,502,'2026-07-09 13:55:01',NULL,NULL),(22,3,503,'2026-07-09 13:55:01',NULL,NULL),(23,3,504,'2026-07-09 13:55:01',NULL,NULL),(24,3,505,'2026-07-09 13:55:01',NULL,NULL),(25,3,506,'2026-07-09 13:55:01',NULL,NULL),(26,3,507,'2026-07-09 13:55:01',NULL,NULL),(27,3,508,'2026-07-09 13:55:01',NULL,NULL),(28,3,509,'2026-07-09 13:55:01',NULL,NULL),(29,3,510,'2026-07-09 13:55:01',NULL,NULL),(30,3,511,'2026-07-09 13:55:01',NULL,NULL),(31,3,512,'2026-07-09 13:55:01',NULL,NULL),(32,3,513,'2026-07-09 13:55:01',NULL,NULL),(33,3,514,'2026-07-09 13:55:01',NULL,NULL),(34,3,515,'2026-07-09 13:55:01',NULL,NULL),(35,3,516,'2026-07-09 13:55:01',NULL,NULL),(36,3,517,'2026-07-09 13:55:01',NULL,NULL),(37,3,518,'2026-07-09 13:55:01',NULL,NULL),(38,3,519,'2026-07-09 13:55:01',NULL,NULL),(39,3,520,'2026-07-09 13:55:01',NULL,NULL),(40,3,521,'2026-07-09 13:55:01',NULL,NULL),(41,3,522,'2026-07-09 13:55:01',NULL,NULL),(42,3,523,'2026-07-09 13:55:01',NULL,NULL),(43,3,524,'2026-07-09 13:55:01',NULL,NULL),(44,3,525,'2026-07-09 13:55:01',NULL,NULL),(45,3,526,'2026-07-09 13:55:01',NULL,NULL),(46,3,527,'2026-07-09 13:55:01',NULL,NULL),(47,3,528,'2026-07-09 13:55:01',NULL,NULL),(48,3,529,'2026-07-09 13:55:01',NULL,NULL),(49,3,530,'2026-07-09 13:55:01',NULL,NULL),(50,3,531,'2026-07-09 13:55:01',NULL,NULL),(51,3,532,'2026-07-09 13:55:01',NULL,NULL),(52,3,533,'2026-07-09 13:55:01',NULL,NULL),(53,3,534,'2026-07-09 13:55:01',NULL,NULL),(54,3,535,'2026-07-09 13:55:01',NULL,NULL),(55,3,536,'2026-07-09 13:55:01',NULL,NULL),(56,3,537,'2026-07-09 13:55:01',NULL,NULL),(57,3,538,'2026-07-09 13:55:01',NULL,NULL),(58,3,539,'2026-07-09 13:55:01',NULL,NULL),(59,3,540,'2026-07-09 13:55:01',NULL,NULL),(60,3,541,'2026-07-09 13:55:01',NULL,NULL),(61,3,542,'2026-07-09 13:55:01',NULL,NULL),(62,3,543,'2026-07-09 13:55:01',NULL,NULL),(63,3,544,'2026-07-09 13:55:01',NULL,NULL),(64,3,545,'2026-07-09 13:55:01',NULL,NULL),(65,3,546,'2026-07-09 13:55:01',NULL,NULL),(66,3,547,'2026-07-09 13:55:01',NULL,NULL),(67,3,548,'2026-07-09 13:55:01',NULL,NULL),(68,3,549,'2026-07-09 13:55:01',NULL,NULL),(69,3,550,'2026-07-09 13:55:01',NULL,NULL),(70,3,551,'2026-07-09 13:55:01',NULL,NULL),(71,3,552,'2026-07-09 13:55:01',NULL,NULL),(72,3,553,'2026-07-09 13:55:01',NULL,NULL),(73,3,554,'2026-07-09 13:55:01',NULL,NULL),(74,3,555,'2026-07-09 13:55:01',NULL,NULL),(75,3,556,'2026-07-09 13:55:01',NULL,NULL),(76,3,557,'2026-07-09 13:55:01',NULL,NULL),(77,3,558,'2026-07-09 13:55:01',NULL,NULL),(78,3,559,'2026-07-09 13:55:01',NULL,NULL),(79,3,560,'2026-07-09 13:55:01',NULL,NULL),(80,3,561,'2026-07-09 13:55:01',NULL,NULL),(81,3,562,'2026-07-09 13:55:01',NULL,NULL),(82,3,563,'2026-07-09 13:55:01',NULL,NULL),(83,3,564,'2026-07-09 13:55:01',NULL,NULL),(84,3,565,'2026-07-09 13:55:01',NULL,NULL),(85,3,566,'2026-07-09 13:55:01',NULL,NULL),(86,3,567,'2026-07-09 13:55:01',NULL,NULL),(87,3,568,'2026-07-09 13:55:01',NULL,NULL),(88,3,569,'2026-07-09 13:55:01',NULL,NULL),(89,3,570,'2026-07-09 13:55:01',NULL,NULL),(90,3,571,'2026-07-09 13:55:01',NULL,NULL),(91,3,572,'2026-07-09 13:55:01',NULL,NULL),(92,3,573,'2026-07-09 13:55:01',NULL,NULL),(93,3,574,'2026-07-09 13:55:01',NULL,NULL),(94,3,575,'2026-07-09 13:55:01',NULL,NULL),(95,3,576,'2026-07-09 13:55:01',NULL,NULL),(96,3,577,'2026-07-09 13:55:01',NULL,NULL),(97,3,578,'2026-07-09 13:55:01',NULL,NULL),(98,3,579,'2026-07-09 13:55:01',NULL,NULL),(99,3,580,'2026-07-09 13:55:01',NULL,NULL),(100,3,581,'2026-07-09 13:55:01',NULL,NULL),(101,3,582,'2026-07-09 13:55:01',NULL,NULL),(102,3,583,'2026-07-09 13:55:01',NULL,NULL),(103,3,584,'2026-07-09 13:55:01',NULL,NULL),(104,3,585,'2026-07-09 13:55:01',NULL,NULL),(105,3,586,'2026-07-09 13:55:01',NULL,NULL),(106,3,587,'2026-07-09 13:55:01',NULL,NULL),(107,3,588,'2026-07-09 13:55:01',NULL,NULL),(108,3,589,'2026-07-09 13:55:01',NULL,NULL),(109,3,590,'2026-07-09 13:55:01',NULL,NULL),(110,3,591,'2026-07-09 13:55:01',NULL,NULL),(111,3,592,'2026-07-09 13:55:01',NULL,NULL),(112,3,901,'2026-07-09 13:55:01',NULL,NULL),(113,3,902,'2026-07-09 13:55:01',NULL,NULL),(114,3,903,'2026-07-09 13:55:01',NULL,NULL),(115,3,904,'2026-07-09 13:55:01',NULL,NULL),(116,3,905,'2026-07-09 13:55:01',NULL,NULL),(117,3,906,'2026-07-09 13:55:01',NULL,NULL),(118,3,907,'2026-07-09 13:55:01',NULL,NULL),(119,3,908,'2026-07-09 13:55:01',NULL,NULL),(120,3,909,'2026-07-09 13:55:01',NULL,NULL);

--
-- Table structure for table `broadcasts`
--

CREATE TABLE `broadcasts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `sender_id` int(10) unsigned NOT NULL,
  `severity` enum('info','warning','critical') NOT NULL DEFAULT 'info',
  `title` varchar(150) NOT NULL,
  `body` varchar(1000) NOT NULL,
  `target_departments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '["engineering","fo"] atau "all"' CHECK (json_valid(`target_departments`)),
  `requires_ack` tinyint(1) NOT NULL DEFAULT 0,
  `expires_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `app_source` enum('fix','hrd','sell') NOT NULL DEFAULT 'fix' COMMENT 'modul asal pengumuman: fix (engineering existing) | hrd (CREW) | sell (SELL)',
  PRIMARY KEY (`id`),
  KEY `idx_broadcasts_property_created` (`property_id`,`created_at`),
  KEY `idx_broadcasts_sender` (`sender_id`),
  CONSTRAINT `fk_broadcasts_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_broadcasts_sender` FOREIGN KEY (`sender_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `broadcasts`
--

INSERT INTO `broadcasts` VALUES (1,1,3,'critical','Lift 2 OOS','Lift servis out of service karena perbaikan pintu, gunakan lift tamu untuk sementara. Estimasi normal besok pagi.','[\"front_office\",\"housekeeping\"]',1,'2026-07-09 18:57:09','2026-07-08 16:57:09','fix'),(2,1,2,'info','PLN padam terjadwal','PLN padam terjadwal besok 09.00-11.00 untuk pemeliharaan gardu, genset akan running otomatis.','\"all\"',0,'2026-07-10 18:57:09','2026-07-07 18:57:09','fix'),(3,1,900,'info','Uji broadcast GM — DUMMY','Tes hak kirim GM (task #9). Abaikan.','\"all\"',0,NULL,'2026-07-09 13:55:01','fix');

--
-- Table structure for table `checklist_items`
--

CREATE TABLE `checklist_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `checklist_id` int(10) unsigned NOT NULL,
  `seq` smallint(5) unsigned NOT NULL,
  `text` varchar(255) NOT NULL,
  `type` enum('pass_fail','numeric','text','photo') NOT NULL,
  `unit` varchar(30) DEFAULT NULL,
  `min_value` decimal(12,4) DEFAULT NULL,
  `max_value` decimal(12,4) DEFAULT NULL,
  `photo_required_on_fail` tinyint(1) NOT NULL DEFAULT 0,
  `guidance` varchar(500) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_checklist_items_checklist_seq` (`checklist_id`,`seq`),
  CONSTRAINT `fk_checklist_items_checklist` FOREIGN KEY (`checklist_id`) REFERENCES `checklists` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `checklist_items`
--

INSERT INTO `checklist_items` VALUES (1,1,1,'Level solar mencukupi','pass_fail',NULL,NULL,NULL,1,'Cek indikator tangki harian, minimal 3/4 penuh','2026-07-08 18:57:08','2026-07-08 18:57:08'),(2,1,2,'Level oli mesin normal','pass_fail',NULL,NULL,NULL,1,'Cek dipstick, di antara batas L dan F','2026-07-08 18:57:08','2026-07-08 18:57:08'),(3,1,3,'Level air radiator/coolant normal','pass_fail',NULL,NULL,NULL,1,'Cek tabung reservoir','2026-07-08 18:57:08','2026-07-08 18:57:08'),(4,1,4,'Tegangan aki starter','numeric','V',12.4000,14.0000,1,'Ukur dengan multimeter di terminal aki, minimal 12,4 V','2026-07-08 18:57:08','2026-07-08 18:57:08'),(5,1,5,'Panel kontrol tanpa alarm aktif','pass_fail',NULL,NULL,NULL,1,'Periksa layar panel AMF/genset, pastikan tidak ada fault','2026-07-08 18:57:08','2026-07-08 18:57:08'),(6,1,6,'Tidak ada rembesan solar/oli/air','pass_fail',NULL,NULL,NULL,1,'Periksa lantai bawah mesin dan sambungan pipa','2026-07-08 18:57:08','2026-07-08 18:57:08'),(7,1,7,'Test run 10-15 menit lancar','pass_fail',NULL,NULL,NULL,1,'Jalankan tanpa beban, dengarkan suara abnormal','2026-07-08 18:57:08','2026-07-08 18:57:08'),(8,1,8,'Jam operasi mesin (running hour)','numeric','jam',0.0000,NULL,0,'Catat dari hour meter panel genset','2026-07-08 18:57:08','2026-07-08 18:57:08'),(9,1,9,'Ruang genset bersih & APAR tersedia','pass_fail',NULL,NULL,NULL,1,'APAR ada, tekanan hijau, tidak kadaluarsa','2026-07-08 18:57:08','2026-07-08 18:57:08'),(10,2,1,'Filter udara dicuci/diganti','pass_fail',NULL,NULL,NULL,0,'Lepas filter, cuci dengan air bersih, keringkan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(11,2,2,'Suhu udara supply','numeric','°C',16.0000,20.0000,1,'Ukur di grill supply dengan thermometer infrared','2026-07-08 18:57:08','2026-07-08 18:57:08'),(12,2,3,'Arus kompresor normal','numeric','A',0.0000,NULL,1,'Ukur dengan clamp meter, bandingkan nameplate','2026-07-08 18:57:08','2026-07-08 18:57:08'),(13,2,4,'Drainase lancar, tidak ada tetesan','pass_fail',NULL,NULL,NULL,1,'Periksa pipa drain dan area sekitar unit indoor','2026-07-08 18:57:08','2026-07-08 18:57:08'),(14,2,5,'Tidak ada bunyi/getaran abnormal','pass_fail',NULL,NULL,NULL,1,'Dengarkan unit indoor dan outdoor saat beroperasi','2026-07-08 18:57:08','2026-07-08 18:57:08'),(15,2,6,'Thermostat/remote berfungsi normal','pass_fail',NULL,NULL,NULL,0,'Uji naik-turun setting suhu','2026-07-08 18:57:08','2026-07-08 18:57:08'),(16,2,7,'Isolasi pipa refrigerant utuh','pass_fail',NULL,NULL,NULL,1,'Periksa pipa tidak berkeringat/isolasi sobek','2026-07-08 18:57:08','2026-07-08 18:57:08'),(17,2,8,'Bracket unit outdoor kokoh','pass_fail',NULL,NULL,NULL,1,'Periksa baut dan karat pada bracket','2026-07-08 18:57:08','2026-07-08 18:57:08'),(18,3,1,'Pintu & card reader berfungsi','pass_fail',NULL,NULL,NULL,1,'Uji buka-tutup dan tap kartu 2x','2026-07-08 18:57:08','2026-07-08 18:57:08'),(19,3,2,'Waktu air panas keluar dari kran','numeric','detik',0.0000,30.0000,1,'Hitung waktu sejak kran dibuka sampai panas','2026-07-08 18:57:08','2026-07-08 18:57:08'),(20,3,3,'Shower berfungsi & tidak bocor','pass_fail',NULL,NULL,NULL,1,'Cek tekanan dan sambungan pipa','2026-07-08 18:57:08','2026-07-08 18:57:08'),(21,3,4,'Flush toilet berfungsi normal','pass_fail',NULL,NULL,NULL,1,'Uji flush penuh, cek kebocoran tangki','2026-07-08 18:57:08','2026-07-08 18:57:08'),(22,3,5,'Sealant kamar mandi tidak jamur/lepas','pass_fail',NULL,NULL,NULL,1,'Periksa nat sekitar bathtub/shower','2026-07-08 18:57:08','2026-07-08 18:57:08'),(23,3,6,'Exhaust kamar mandi berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji hidupkan, rasakan hisapan udara','2026-07-08 18:57:08','2026-07-08 18:57:08'),(24,3,7,'Semua saklar berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji tiap saklar satu per satu','2026-07-08 18:57:08','2026-07-08 18:57:08'),(25,3,8,'Semua stopkontak berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji dengan tester colokan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(26,3,9,'Semua lampu menyala','pass_fail',NULL,NULL,NULL,0,'Cek tiap titik lampu termasuk baca','2026-07-08 18:57:08','2026-07-08 18:57:08'),(27,3,10,'TV & remote berfungsi','pass_fail',NULL,NULL,NULL,0,'Nyalakan, ganti channel, cek remote','2026-07-08 18:57:08','2026-07-08 18:57:08'),(28,3,11,'Telepon kamar berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji panggilan ke operator/FO','2026-07-08 18:57:08','2026-07-08 18:57:08'),(29,3,12,'Sinyal Wi-Fi in-room','numeric','bar',2.0000,5.0000,0,'Cek indikator sinyal di HP, skala 1-5','2026-07-08 18:57:08','2026-07-08 18:57:08'),(30,3,13,'Safe box berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji set kode dan buka-tutup','2026-07-08 18:57:08','2026-07-08 18:57:08'),(31,3,14,'Suhu minibar','numeric','°C',0.0000,7.0000,1,'Ukur dengan thermometer, maksimal 7°C','2026-07-08 18:57:08','2026-07-08 18:57:08'),(32,3,15,'AC: suhu tercapai sesuai setting','numeric','°C',16.0000,22.0000,1,'Set 20°C, tunggu 10 menit, ukur suhu ruang','2026-07-08 18:57:08','2026-07-08 18:57:08'),(33,3,16,'AC: tidak ada bunyi/kebocoran','pass_fail',NULL,NULL,NULL,1,'Dengarkan dan periksa unit indoor','2026-07-08 18:57:08','2026-07-08 18:57:08'),(34,3,17,'Furnitur & laci berfungsi baik','pass_fail',NULL,NULL,NULL,0,'Cek engsel, laci, tidak goyang','2026-07-08 18:57:08','2026-07-08 18:57:08'),(35,3,18,'Gorden berfungsi & tidak rusak','pass_fail',NULL,NULL,NULL,0,'Uji tarik buka-tutup, cek rel','2026-07-08 18:57:08','2026-07-08 18:57:08'),(36,3,19,'Jendela & kunci berfungsi baik','pass_fail',NULL,NULL,NULL,1,'Uji buka-tutup dan kunci pengaman','2026-07-08 18:57:08','2026-07-08 18:57:08'),(37,3,20,'Smoke detector teruji','pass_fail',NULL,NULL,NULL,1,'Uji dengan smoke tester bila tersedia','2026-07-08 18:57:08','2026-07-08 18:57:08'),(38,3,21,'Kondisi cat dinding baik','pass_fail',NULL,NULL,NULL,1,'Periksa noda, retak rambut, kelupas','2026-07-08 18:57:08','2026-07-08 18:57:08'),(39,3,22,'Kondisi karpet/lantai baik','pass_fail',NULL,NULL,NULL,1,'Periksa noda, sobek, terangkat','2026-07-08 18:57:08','2026-07-08 18:57:08'),(40,3,23,'Plafon tidak ada noda air (bocor)','pass_fail',NULL,NULL,NULL,1,'Periksa seluruh permukaan plafon','2026-07-08 18:57:08','2026-07-08 18:57:08'),(41,3,24,'Kondisi pintu & kusen baik','pass_fail',NULL,NULL,NULL,1,'Periksa cat/plitur, engsel, penutup otomatis','2026-07-08 18:57:08','2026-07-08 18:57:08'),(42,3,25,'Hair dryer berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji nyala dan panas','2026-07-08 18:57:08','2026-07-08 18:57:08'),(43,3,26,'Kettle/coffee maker berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji nyala dan pemanasan air','2026-07-08 18:57:08','2026-07-08 18:57:08'),(44,3,27,'Cermin & rak kamar mandi baik','pass_fail',NULL,NULL,NULL,0,'Periksa keretakan dan kekokohan rak','2026-07-08 18:57:08','2026-07-08 18:57:08'),(45,3,28,'Ventilasi AC bersih (grill/kisi)','pass_fail',NULL,NULL,NULL,0,'Periksa debu pada grill supply/return','2026-07-08 18:57:08','2026-07-08 18:57:08'),(46,3,29,'Tidak ada hama (serangga/tikus)','pass_fail',NULL,NULL,NULL,1,'Periksa sudut ruangan, kolong furnitur','2026-07-08 18:57:08','2026-07-08 18:57:08'),(47,3,30,'Kondisi umum kamar layak jual','pass_fail',NULL,NULL,NULL,1,'Penilaian keseluruhan sebelum kamar dibuka kembali','2026-07-08 18:57:08','2026-07-08 18:57:08'),(48,4,1,'Suhu cold room 1','numeric','°C',0.0000,5.0000,1,'Ukur dengan thermometer probe di titik tengah','2026-07-08 18:57:08','2026-07-08 18:57:08'),(49,4,2,'Suhu cold room 2','numeric','°C',0.0000,5.0000,1,'Ukur dengan thermometer probe di titik tengah','2026-07-08 18:57:08','2026-07-08 18:57:08'),(50,4,3,'Suhu freezer 1','numeric','°C',-25.0000,-18.0000,1,'Ukur dengan thermometer probe','2026-07-08 18:57:08','2026-07-08 18:57:08'),(51,4,4,'Suhu freezer 2','numeric','°C',-25.0000,-18.0000,1,'Ukur dengan thermometer probe','2026-07-08 18:57:08','2026-07-08 18:57:08'),(52,4,5,'Suhu rinse dishwasher','numeric','°C',82.0000,90.0000,1,'Cek gauge suhu final rinse dishwasher','2026-07-08 18:57:08','2026-07-08 18:57:08'),(53,4,6,'Pintu cold room/freezer tertutup rapat','pass_fail',NULL,NULL,NULL,1,'Periksa seal karet pintu dan kerapatan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(54,5,1,'Semua kamera live (per unit)','pass_fail',NULL,NULL,NULL,1,'Cek satu per satu dari monitoring wall/NVR','2026-07-08 18:57:08','2026-07-08 18:57:08'),(55,5,2,'Playback acak berhasil (3 titik)','pass_fail',NULL,NULL,NULL,1,'Putar ulang rekaman 3 kamera acak, minggu lalu','2026-07-08 18:57:08','2026-07-08 18:57:08'),(56,5,3,'Retensi rekaman mencukupi','numeric','hari',30.0000,NULL,1,'Cek pengaturan retensi di NVR, minimal 30 hari','2026-07-08 18:57:08','2026-07-08 18:57:08'),(57,5,4,'HDD/storage NVR sehat','pass_fail',NULL,NULL,NULL,1,'Cek status S.M.A.R.T. dan kapasitas tersisa','2026-07-08 18:57:08','2026-07-08 18:57:08'),(58,5,5,'Access control fail-safe/fail-secure teruji','pass_fail',NULL,NULL,NULL,1,'Simulasikan pemadaman listrik di pintu sample','2026-07-08 18:57:08','2026-07-08 18:57:08'),(59,5,6,'Baterai door lock kamar (daftar < 20%)','text',NULL,NULL,NULL,0,'Catat daftar nomor kamar dengan baterai lemah dari sistem','2026-07-08 18:57:08','2026-07-08 18:57:08'),(60,6,1,'Suhu ruang server','numeric','°C',18.0000,24.0000,1,'Ukur dengan thermometer ruangan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(61,6,2,'UPS rack test + estimasi runtime','numeric','menit',0.0000,NULL,1,'Lepas listrik sesaat, catat estimasi runtime UPS','2026-07-08 18:57:08','2026-07-08 18:57:08'),(62,6,3,'Restore test 1 file berhasil','pass_fail',NULL,NULL,NULL,1,'Pilih 1 file backup acak, uji restore','2026-07-08 18:57:08','2026-07-08 18:57:08'),(63,6,4,'Kapasitas storage terpakai','numeric','%',0.0000,80.0000,1,'Cek utilisasi disk server & NAS, maksimal 80%','2026-07-08 18:57:08','2026-07-08 18:57:08'),(64,6,5,'Patch OS/security terkini','pass_fail',NULL,NULL,NULL,0,'Cek update terakhir terpasang','2026-07-08 18:57:08','2026-07-08 18:57:08'),(65,6,6,'Akses fisik ruang server terkontrol','pass_fail',NULL,NULL,NULL,1,'Cek pintu terkunci, log akses','2026-07-08 18:57:08','2026-07-08 18:57:08'),(66,6,7,'Kabel rapi & ruangan bersih','pass_fail',NULL,NULL,NULL,0,'Periksa kerapian rack dan kebersihan lantai','2026-07-08 18:57:08','2026-07-08 18:57:08'),(67,7,1,'pH air kolam','numeric','pH',7.2000,7.6000,1,'Uji dengan test kit pH pool','2026-07-08 18:57:08','2026-07-08 18:57:08'),(68,7,2,'Kadar free chlorine','numeric','ppm',1.0000,3.0000,1,'Uji dengan test kit chlorine','2026-07-08 18:57:08','2026-07-08 18:57:08'),(69,7,3,'Kejernihan air baik','pass_fail',NULL,NULL,NULL,1,'Pandangan visual, dasar kolam terlihat jelas','2026-07-08 18:57:08','2026-07-08 18:57:08'),(70,7,4,'Skimmer bersih & berfungsi','pass_fail',NULL,NULL,NULL,0,'Periksa keranjang skimmer, bersihkan bila penuh','2026-07-08 18:57:08','2026-07-08 18:57:08'),(71,7,5,'Tekanan filter','numeric','bar',0.0000,1.5000,1,'Baca gauge filter, backwash bila melebihi ambang','2026-07-08 18:57:08','2026-07-08 18:57:08'),(72,7,6,'Alat rescue tersedia & layak','pass_fail',NULL,NULL,NULL,1,'Cek pelampung, tongkat rescue, tidak rusak','2026-07-08 18:57:08','2026-07-08 18:57:08'),(73,8,1,'Tekanan APAR normal (per unit)','pass_fail',NULL,NULL,NULL,1,'Jarum gauge di zona hijau','2026-07-08 18:57:08','2026-07-08 18:57:08'),(74,8,2,'Segel APAR utuh','pass_fail',NULL,NULL,NULL,1,'Pin dan segel tidak rusak/hilang','2026-07-08 18:57:08','2026-07-08 18:57:08'),(75,8,3,'Akses ke APAR tidak terhalang','pass_fail',NULL,NULL,NULL,1,'Tidak ada barang menghalangi jangkauan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(76,8,4,'Hydrant box lengkap','pass_fail',NULL,NULL,NULL,1,'Selang, nozzle, kunci tersedia lengkap','2026-07-08 18:57:08','2026-07-08 18:57:08'),(77,8,5,'Emergency lamp menyala saat tes','pass_fail',NULL,NULL,NULL,1,'Tekan tombol tes, pastikan menyala','2026-07-08 18:57:08','2026-07-08 18:57:08'),(78,8,6,'Exit sign menyala normal','pass_fail',NULL,NULL,NULL,1,'Periksa semua tanda exit di rute evakuasi','2026-07-08 18:57:08','2026-07-08 18:57:08'),(79,8,7,'Pintu/tangga darurat bebas hambatan','pass_fail',NULL,NULL,NULL,1,'Tidak ada barang menghalangi jalur evakuasi','2026-07-08 18:57:08','2026-07-08 18:57:08'),(80,9,1,'Cat tembok: tidak mengelupas/noda/retak rambut','pass_fail',NULL,NULL,NULL,1,'Periksa dinding interior dan koridor','2026-07-08 18:57:08','2026-07-08 18:57:08'),(81,9,2,'Plitur kusen-pintu tidak kusam/gores','pass_fail',NULL,NULL,NULL,1,'Periksa permukaan kusen dan daun pintu','2026-07-08 18:57:08','2026-07-08 18:57:08'),(82,9,3,'Sealant kamar mandi bebas jamur/lepas','pass_fail',NULL,NULL,NULL,1,'Periksa nat sekitar shower/bathtub','2026-07-08 18:57:08','2026-07-08 18:57:08'),(83,9,4,'Nat keramik dalam kondisi baik','pass_fail',NULL,NULL,NULL,1,'Periksa nat lantai dan dinding kamar mandi','2026-07-08 18:57:08','2026-07-08 18:57:08'),(84,9,5,'Plafon tanpa noda air (indikasi bocor)','pass_fail',NULL,NULL,NULL,1,'Periksa seluruh permukaan plafon kamar & koridor','2026-07-08 18:57:08','2026-07-08 18:57:08'),(85,9,6,'Wallpaper tidak terkelupas/menggelembung','pass_fail',NULL,NULL,NULL,1,'Periksa sambungan dan sudut ruangan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(86,9,7,'List profil terpasang rapi','pass_fail',NULL,NULL,NULL,0,'Periksa list plafon dan skirting','2026-07-08 18:57:08','2026-07-08 18:57:08'),(87,10,1,'Kondisi fill & basin baik','pass_fail',NULL,NULL,NULL,1,'Periksa fill tidak tersumbat, basin bersih','2026-07-08 18:57:08','2026-07-08 18:57:08'),(88,10,2,'Level air mencukupi','pass_fail',NULL,NULL,NULL,1,'Cek indikator level pada basin','2026-07-08 18:57:08','2026-07-08 18:57:08'),(89,10,3,'Kualitas air (dosis kimia sesuai)','pass_fail',NULL,NULL,NULL,0,'Cek log dosing kimia water treatment','2026-07-08 18:57:08','2026-07-08 18:57:08'),(90,10,4,'Fan & belt kondisi baik','pass_fail',NULL,NULL,NULL,1,'Periksa keausan belt dan getaran fan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(91,10,5,'Strainer bersih','pass_fail',NULL,NULL,NULL,0,'Bersihkan dari kotoran/lumut','2026-07-08 18:57:08','2026-07-08 18:57:08'),(92,10,6,'Tidak ada lumut/kerak berlebih','pass_fail',NULL,NULL,NULL,1,'Periksa dinding fill dan basin','2026-07-08 18:57:08','2026-07-08 18:57:08'),(93,11,1,'Indikator & metering panel normal','pass_fail',NULL,NULL,NULL,1,'Bandingkan pembacaan dengan standar operasi','2026-07-08 18:57:08','2026-07-08 18:57:08'),(94,11,2,'Ketimpangan beban antar fasa','numeric','%',0.0000,20.0000,1,'Ukur arus tiap fasa, hitung persentase selisih maksimal terhadap rata-rata','2026-07-08 18:57:08','2026-07-08 18:57:08'),(95,11,3,'Suhu ruang panel normal','numeric','°C',0.0000,35.0000,1,'Ukur dengan thermometer ruangan','2026-07-08 18:57:08','2026-07-08 18:57:08'),(96,11,4,'Tidak ada bunyi/bau abnormal','pass_fail',NULL,NULL,NULL,1,'Dengarkan dan cium area sekitar panel','2026-07-08 18:57:08','2026-07-08 18:57:08'),(97,11,5,'Kebersihan & akses panel baik','pass_fail',NULL,NULL,NULL,0,'Area bebas barang, panel bersih dari debu','2026-07-08 18:57:08','2026-07-08 18:57:08'),(98,12,1,'Oli mesin dalam kondisi baik','pass_fail',NULL,NULL,NULL,0,'Cek dipstick dan riwayat penggantian','2026-07-08 18:57:08','2026-07-08 18:57:08'),(99,12,2,'Rem berfungsi baik','pass_fail',NULL,NULL,NULL,1,'Uji pengereman dan ketebalan kampas','2026-07-08 18:57:08','2026-07-08 18:57:08'),(100,12,3,'Kondisi ban (tekanan & keausan)','pass_fail',NULL,NULL,NULL,1,'Cek tekanan sesuai spek, periksa alur ban','2026-07-08 18:57:08','2026-07-08 18:57:08'),(101,12,4,'Lampu-lampu berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji lampu utama, sein, rem, mundur','2026-07-08 18:57:08','2026-07-08 18:57:08'),(102,12,5,'Wiper & washer berfungsi','pass_fail',NULL,NULL,NULL,0,'Uji wiper depan-belakang dan semprotan air','2026-07-08 18:57:08','2026-07-08 18:57:08'),(103,12,6,'Aki dalam kondisi baik','pass_fail',NULL,NULL,NULL,0,'Cek tegangan dan terminal aki','2026-07-08 18:57:08','2026-07-08 18:57:08'),(104,12,7,'AC kendaraan dingin normal','pass_fail',NULL,NULL,NULL,0,'Nyalakan AC, rasakan suhu setelah 5 menit','2026-07-08 18:57:08','2026-07-08 18:57:08'),(105,12,8,'P3K tersedia & lengkap','pass_fail',NULL,NULL,NULL,0,'Cek kotak P3K dan tanggal kadaluarsa obat','2026-07-08 18:57:08','2026-07-08 18:57:08'),(106,12,9,'Odometer saat ini','numeric','km',0.0000,NULL,0,'Catat angka odometer kendaraan','2026-07-08 18:57:08','2026-07-08 18:57:08');

--
-- Table structure for table `checklists`
--

CREATE TABLE `checklists` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned DEFAULT NULL,
  `name` varchar(150) NOT NULL,
  `department` varchar(60) NOT NULL,
  `version` int(10) unsigned NOT NULL DEFAULT 1,
  `status` enum('draft','active','archived') NOT NULL DEFAULT 'draft',
  `parent_version_id` int(10) unsigned DEFAULT NULL,
  `created_by` int(10) unsigned DEFAULT NULL,
  `approved_by` int(10) unsigned DEFAULT NULL,
  `approved_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_checklists_property_status` (`property_id`,`status`),
  KEY `idx_checklists_parent_version` (`parent_version_id`),
  KEY `fk_checklists_created_by` (`created_by`),
  KEY `fk_checklists_approved_by` (`approved_by`),
  CONSTRAINT `fk_checklists_approved_by` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_checklists_created_by` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_checklists_parent_version` FOREIGN KEY (`parent_version_id`) REFERENCES `checklists` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_checklists_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `checklists`
--

INSERT INTO `checklists` VALUES (1,1,'Genset - Mingguan','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(2,1,'AC Split/FCU - Bulanan','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(3,1,'PPM Kamar - 30 Titik (3-bulanan)','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(4,1,'HACCP Suhu - Harian 2x','kitchen',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(5,1,'CCTV & Access Control - Bulanan','it',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(6,1,'Server Room & Backup - Bulanan','it',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(7,1,'Kolam Renang & Jacuzzi - Harian','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(8,1,'Fire Safety - Rute Bulanan','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(9,1,'Inspeksi Finishing Sipil - Kamar & Koridor (6-bulanan)','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(10,1,'Cooling Tower - Mingguan','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(11,1,'Panel Listrik & Trafo - Bulanan','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08'),(12,1,'Kendaraan - Bulanan + 5.000km','engineering',1,'active',NULL,2,3,'2026-01-10 09:00:00','2026-07-08 18:57:08','2026-07-08 18:57:08');

--
-- Table structure for table `contract_assets`
--

CREATE TABLE `contract_assets` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `contract_id` int(10) unsigned NOT NULL,
  `asset_id` int(10) unsigned NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_contract_assets` (`contract_id`,`asset_id`),
  KEY `idx_contract_assets_asset` (`asset_id`),
  CONSTRAINT `fk_contract_assets_asset` FOREIGN KEY (`asset_id`) REFERENCES `assets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_contract_assets_contract` FOREIGN KEY (`contract_id`) REFERENCES `contracts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contract_assets`
--

INSERT INTO `contract_assets` VALUES (1,1,3,'2026-07-08 18:57:09'),(2,1,4,'2026-07-08 18:57:09');

--
-- Table structure for table `contracts`
--

CREATE TABLE `contracts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `vendor_id` int(10) unsigned NOT NULL,
  `title` varchar(150) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `cost_per_year` decimal(14,2) DEFAULT NULL,
  `sla_response_hours` smallint(5) unsigned DEFAULT NULL,
  `visit_frequency` varchar(60) DEFAULT NULL,
  `reminder_days` smallint(5) unsigned DEFAULT NULL,
  `file` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_contracts_property_vendor` (`property_id`,`vendor_id`),
  KEY `idx_contracts_end_date` (`property_id`,`end_date`),
  KEY `fk_contracts_vendor` (`vendor_id`),
  CONSTRAINT `fk_contracts_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_contracts_vendor` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contracts`
--

INSERT INTO `contracts` VALUES (1,1,2,'Kontrak Servis Lift Tahunan','2025-08-22','2026-08-22',60000000.00,4,'monthly',60,NULL,'2026-07-08 18:57:09','2026-07-08 18:57:09');

--
-- Table structure for table `fo_night_audit_reports`
--

CREATE TABLE `fo_night_audit_reports` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `report_date` date NOT NULL COMMENT 'tanggal bisnis yang ditutup (biasanya H-1)',
  `rooms_available` int(10) unsigned DEFAULT NULL,
  `rooms_sold` int(10) unsigned DEFAULT NULL,
  `occupancy_pct` decimal(5,2) DEFAULT NULL COMMENT 'kalau dikosongkan tapi rooms_sold+rooms_available ada, dihitung otomatis di Model saat create()',
  `adr` decimal(12,2) DEFAULT NULL COMMENT 'average daily rate — angka input staff (data operasional)',
  `revenue` decimal(14,2) DEFAULT NULL,
  `arrivals` int(10) unsigned DEFAULT NULL,
  `departures` int(10) unsigned DEFAULT NULL,
  `no_shows` int(10) unsigned DEFAULT NULL,
  `walk_ins` int(10) unsigned DEFAULT NULL,
  `notes` text DEFAULT NULL COMMENT 'catatan insiden semalam',
  `raw_report_json` longtext DEFAULT NULL COMMENT 'hasil parse penuh XLSX Daily Sales PMS (section→rows + guest_ledger) sbg JSON; NULL bila laporan diinput manual tanpa file',
  `submitted_by` int(10) unsigned DEFAULT NULL,
  `submitted_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_fo_night_audit_property_date` (`property_id`,`report_date`),
  KEY `idx_fo_night_audit_property_date` (`property_id`,`report_date`),
  KEY `idx_fo_night_audit_submitted_by` (`submitted_by`),
  CONSTRAINT `fk_fo_night_audit_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_fo_night_audit_submitted_by` FOREIGN KEY (`submitted_by`) REFERENCES `hr_employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fo_night_audit_reports`
--

INSERT INTO `fo_night_audit_reports` VALUES (1,1,'2026-07-08',60,48,80.00,1850000.00,88800000.00,22,18,1,3,'Tamu VIP di Pool Villa 3 minta late check-out — DUMMY (data uji night audit)',NULL,NULL,NULL,'2026-07-09 17:04:54','2026-07-09 17:04:54');

--
-- Table structure for table `generator_log`
--

CREATE TABLE `generator_log` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `run_at` datetime NOT NULL,
  `schedules_processed` int(10) unsigned NOT NULL DEFAULT 0,
  `wo_created` int(10) unsigned NOT NULL DEFAULT 0,
  `status` enum('success','failed','partial') NOT NULL,
  `message` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_generator_log_property_run_at` (`property_id`,`run_at`),
  CONSTRAINT `fk_generator_log_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `generator_log`
--

INSERT INTO `generator_log` VALUES (1,1,'2026-07-07 20:14:02',6,2,'success','Auto-generate PM run harian (DUMMY demo — cron belum live di server ini).'),(2,1,'2026-07-06 20:14:02',6,1,'partial','1 schedule dilewati karena aset non-aktif (DUMMY demo).');

--
-- Table structure for table `history`
--

CREATE TABLE `history` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `wo_id` bigint(20) unsigned NOT NULL,
  `user_id` int(10) unsigned DEFAULT NULL,
  `action` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_history_wo` (`wo_id`,`created_at`),
  KEY `idx_history_user` (`user_id`),
  CONSTRAINT `fk_history_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_history_wo` FOREIGN KEY (`wo_id`) REFERENCES `work_orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `history`
--

INSERT INTO `history` VALUES (1,1,5,'reported','2026-07-05 18:57:09'),(2,1,3,'assigned to tech.candra','2026-07-05 19:57:09'),(3,1,4,'started','2026-07-06 16:57:09'),(4,1,4,'done','2026-07-06 18:57:09'),(5,1,3,'verified','2026-07-07 16:57:09'),(6,5,5,'reported','2026-07-08 14:57:09'),(7,5,3,'assigned to tech.candra','2026-07-08 15:57:09'),(8,5,4,'started','2026-07-08 16:57:09'),(9,10,5,'reported','2026-07-07 12:57:09'),(10,11,4,'started (downtime aset critical dimulai)','2026-07-08 17:57:09'),(11,19,3,'created (WO vendor - kontrak lift)','2026-07-04 18:57:09'),(12,19,4,'done - berita acara vendor diterima','2026-07-05 16:57:09'),(13,20,4,'skipped: kamar occupied','2026-07-06 18:57:09'),(14,25,3,'created','2026-07-04 18:57:09'),(15,25,4,'done','2026-07-06 16:57:09'),(16,25,3,'cost added: invoice vendor Rp4.000.000','2026-07-06 17:57:09'),(17,26,3,'rejected: duplikat WO-000001','2026-07-05 20:57:09'),(18,101,5,'reported','2026-07-08 15:57:09'),(19,101,3,'assigned to it.rina','2026-07-08 16:57:09'),(20,101,10,'started','2026-07-08 17:57:09'),(21,103,5,'reported','2026-07-07 12:57:09'),(22,103,11,'done','2026-07-07 18:57:09'),(23,104,5,'reported','2026-07-08 10:57:09'),(24,105,12,'started','2026-07-08 14:57:09'),(25,112,7,'done','2026-07-06 08:57:09'),(26,112,3,'verified','2026-07-07 12:57:09'),(27,114,9,'done','2026-07-07 15:57:09'),(28,114,3,'verified','2026-07-07 22:57:09'),(29,123,8,'started (urgent combi oven)','2026-07-08 18:27:09');

--
-- Table structure for table `hr_ai_intakes`
--

CREATE TABLE `hr_ai_intakes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `raw_text` text NOT NULL,
  `source_type` enum('guest_request','event','note') NOT NULL DEFAULT 'note',
  `parsed` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`parsed`)),
  `model` varchar(60) DEFAULT NULL,
  `tokens_in` int(10) unsigned DEFAULT NULL,
  `tokens_out` int(10) unsigned DEFAULT NULL,
  `cost_idr` decimal(12,2) DEFAULT NULL,
  `confirmed_by` int(10) unsigned DEFAULT NULL,
  `created_task_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`created_task_ids`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_ai_intakes_property` (`property_id`),
  KEY `idx_hr_ai_intakes_confirmed_by` (`confirmed_by`),
  CONSTRAINT `fk_hr_ai_intakes_confirmed_by` FOREIGN KEY (`confirmed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_ai_intakes_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_ai_intakes`
--

INSERT INTO `hr_ai_intakes` VALUES (1,1,'Tamu kamar 1203 komplain AC berisik malam ini, tolong dicek sebelum jam 21.00 (DUMMY demo).','guest_request','{\"summary\": \"AC berisik kamar 1203 (DUMMY demo)\", \"suggested_department\": \"engineering\", \"suggested_priority\": \"urgent\"}','stub-haiku (DUMMY demo, belum tersambung API nyata)',120,45,150.00,NULL,NULL,'2026-07-08 20:14:02');

--
-- Table structure for table `hr_attendance_days`
--

CREATE TABLE `hr_attendance_days` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned NOT NULL,
  `date` date NOT NULL,
  `shift_code` enum('M','A','N','M2','OFF','PH') DEFAULT NULL,
  `time_in` datetime DEFAULT NULL,
  `time_out` datetime DEFAULT NULL,
  `late_min` int(10) unsigned NOT NULL DEFAULT 0,
  `early_min` int(10) unsigned NOT NULL DEFAULT 0,
  `overtime_min` int(10) unsigned DEFAULT NULL COMMENT 'approved',
  `status` enum('present','late','alpha','leave','off','holiday','incomplete') NOT NULL DEFAULT 'present',
  `dispute_status` enum('none','submitted','approved','rejected') NOT NULL DEFAULT 'none',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_attendance_days_employee_date` (`employee_id`,`date`),
  KEY `idx_hr_attendance_days_property_date` (`property_id`,`date`),
  CONSTRAINT `fk_hr_attendance_days_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_attendance_days_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_attendance_days`
--

INSERT INTO `hr_attendance_days` VALUES (1,1,1,'2026-06-24','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(2,1,1,'2026-06-25','M2','2026-06-25 09:00:00','2026-06-25 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(3,1,1,'2026-06-26','M2','2026-06-26 09:00:00','2026-06-26 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(4,1,1,'2026-06-27','M2','2026-06-27 09:00:00','2026-06-27 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(5,1,1,'2026-06-28','M2','2026-06-28 09:00:00','2026-06-28 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(6,1,1,'2026-06-29','M2','2026-06-29 09:00:00','2026-06-29 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(7,1,1,'2026-06-30','M2','2026-06-30 09:00:00','2026-06-30 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(8,1,1,'2026-07-01','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(9,1,1,'2026-07-02','M2','2026-07-02 09:00:00','2026-07-02 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(10,1,1,'2026-07-03','M2','2026-07-03 09:00:00','2026-07-03 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(11,1,1,'2026-07-04','M2','2026-07-04 09:00:00','2026-07-04 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(12,1,1,'2026-07-05','M2','2026-07-05 09:00:00','2026-07-05 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(13,1,1,'2026-07-06','M2','2026-07-06 09:00:00','2026-07-06 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(14,1,1,'2026-07-07','M2','2026-07-07 09:00:00','2026-07-07 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(15,1,2,'2026-06-24','M2','2026-06-24 09:00:00','2026-06-24 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(16,1,2,'2026-06-25','M2','2026-06-25 09:00:00','2026-06-25 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(17,1,2,'2026-06-26','M2','2026-06-26 09:00:00','2026-06-26 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(18,1,2,'2026-06-27','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(19,1,2,'2026-06-28','M2','2026-06-28 09:00:00','2026-06-28 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(20,1,2,'2026-06-29','M2','2026-06-29 09:00:00','2026-06-29 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(21,1,2,'2026-06-30','M2','2026-06-30 09:00:00','2026-06-30 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(22,1,2,'2026-07-01','M2','2026-07-01 09:00:00','2026-07-01 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(23,1,2,'2026-07-02','M2','2026-07-02 09:00:00','2026-07-02 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(24,1,2,'2026-07-03','M2','2026-07-03 09:00:00','2026-07-03 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(25,1,2,'2026-07-04','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(26,1,2,'2026-07-05','M2','2026-07-05 09:00:00','2026-07-05 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(27,1,2,'2026-07-06','M2','2026-07-06 09:00:00','2026-07-06 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(28,1,2,'2026-07-07','M2','2026-07-07 09:00:00','2026-07-07 17:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(29,1,3,'2026-06-24','A','2026-06-24 14:00:00','2026-06-24 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(30,1,3,'2026-06-25','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(31,1,3,'2026-06-26','A','2026-06-26 14:00:00','2026-06-26 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(32,1,3,'2026-06-27','M','2026-06-27 07:00:00','2026-06-27 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(33,1,3,'2026-06-28','A','2026-06-28 14:00:00','2026-06-28 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(34,1,3,'2026-06-29','M','2026-06-29 07:12:00','2026-06-29 15:00:00',12,0,NULL,'late','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(35,1,3,'2026-06-30','A','2026-06-30 14:00:00','2026-06-30 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(36,1,3,'2026-07-01','M','2026-07-01 07:00:00','2026-07-01 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(37,1,3,'2026-07-02','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(38,1,3,'2026-07-03','M','2026-07-03 07:00:00','2026-07-03 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(39,1,3,'2026-07-04','A','2026-07-04 14:00:00','2026-07-04 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(40,1,3,'2026-07-05','M','2026-07-05 07:00:00','2026-07-05 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(41,1,3,'2026-07-06','A','2026-07-06 14:00:00','2026-07-06 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(42,1,3,'2026-07-07','M','2026-07-07 07:00:00','2026-07-07 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(43,1,4,'2026-06-24','M','2026-06-24 07:00:00','2026-06-24 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(44,1,4,'2026-06-25','A','2026-06-25 14:00:00','2026-06-25 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(45,1,4,'2026-06-26','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(46,1,4,'2026-06-27','A','2026-06-27 14:00:00','2026-06-27 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(47,1,4,'2026-06-28','M','2026-06-28 07:00:00','2026-06-28 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(48,1,4,'2026-06-29','A','2026-06-29 14:00:00','2026-06-29 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(49,1,4,'2026-06-30','M','2026-06-30 07:00:00','2026-06-30 14:30:00',0,30,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(50,1,4,'2026-07-01','A','2026-07-01 14:00:00','2026-07-01 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(51,1,4,'2026-07-02','M','2026-07-02 07:00:00','2026-07-02 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(52,1,4,'2026-07-03','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(53,1,4,'2026-07-04','M','2026-07-04 07:00:00','2026-07-04 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(54,1,4,'2026-07-05','A','2026-07-05 14:00:00','2026-07-05 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(55,1,4,'2026-07-06','M','2026-07-06 07:00:00','2026-07-06 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(56,1,4,'2026-07-07','A','2026-07-07 14:00:00','2026-07-07 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(57,1,5,'2026-06-24','A','2026-06-24 14:00:00','2026-06-24 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(58,1,5,'2026-06-25','M','2026-06-25 07:00:00','2026-06-25 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(59,1,5,'2026-06-26','A','2026-06-26 14:00:00','2026-06-26 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(60,1,5,'2026-06-27','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(61,1,5,'2026-06-28','A','2026-06-28 14:00:00','2026-06-28 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(62,1,5,'2026-06-29',NULL,NULL,NULL,0,0,NULL,'leave','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(63,1,5,'2026-06-30',NULL,NULL,NULL,0,0,NULL,'leave','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(64,1,5,'2026-07-01','M','2026-07-01 07:00:00','2026-07-01 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(65,1,5,'2026-07-02','A','2026-07-02 14:00:00','2026-07-02 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(66,1,5,'2026-07-03','M','2026-07-03 07:00:00','2026-07-03 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(67,1,5,'2026-07-04','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(68,1,5,'2026-07-05','M','2026-07-05 07:00:00','2026-07-05 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(69,1,5,'2026-07-06','A','2026-07-06 14:00:00','2026-07-06 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(70,1,5,'2026-07-07','M','2026-07-07 07:00:00','2026-07-07 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(71,1,6,'2026-06-24','M','2026-06-24 07:00:00','2026-06-24 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(72,1,6,'2026-06-25','A','2026-06-25 14:00:00','2026-06-25 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(73,1,6,'2026-06-26','M','2026-06-26 07:00:00','2026-06-26 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(74,1,6,'2026-06-27','A','2026-06-27 14:00:00','2026-06-27 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(75,1,6,'2026-06-28','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(76,1,6,'2026-06-29','A','2026-06-29 14:00:00','2026-06-29 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(77,1,6,'2026-06-30','M','2026-06-30 07:00:00','2026-06-30 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(78,1,6,'2026-07-01','A','2026-07-01 14:00:00','2026-07-01 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(79,1,6,'2026-07-02','M','2026-07-02 07:00:00','2026-07-02 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(80,1,6,'2026-07-03','A','2026-07-03 14:00:00','2026-07-03 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(81,1,6,'2026-07-04','M','2026-07-04 07:00:00','2026-07-04 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(82,1,6,'2026-07-05','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(83,1,6,'2026-07-06','M','2026-07-06 07:00:00','2026-07-06 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(84,1,6,'2026-07-07',NULL,NULL,NULL,0,0,NULL,'leave','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(85,1,7,'2026-06-24','A','2026-06-24 14:00:00','2026-06-24 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(86,1,7,'2026-06-25','M','2026-06-25 07:00:00','2026-06-25 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(87,1,7,'2026-06-26','A','2026-06-26 14:00:00','2026-06-26 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(88,1,7,'2026-06-27','M','2026-06-27 07:00:00','2026-06-27 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(89,1,7,'2026-06-28','A','2026-06-28 14:00:00','2026-06-28 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(90,1,7,'2026-06-29','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(91,1,7,'2026-06-30','A','2026-06-30 14:00:00','2026-06-30 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(92,1,7,'2026-07-01','M','2026-07-01 07:00:00','2026-07-01 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(93,1,7,'2026-07-02','A','2026-07-02 14:00:00','2026-07-02 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(94,1,7,'2026-07-03','M','2026-07-03 07:15:00','2026-07-03 15:00:00',15,0,NULL,'late','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(95,1,7,'2026-07-04','A','2026-07-04 14:00:00','2026-07-04 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(96,1,7,'2026-07-05','M','2026-07-05 07:00:00','2026-07-05 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(97,1,7,'2026-07-06','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(98,1,7,'2026-07-07','M','2026-07-07 07:00:00','2026-07-07 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(99,1,8,'2026-06-24','M','2026-06-24 07:00:00','2026-06-24 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(100,1,8,'2026-06-25','A','2026-06-25 14:00:00','2026-06-25 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(101,1,8,'2026-06-26','M','2026-06-26 07:00:00','2026-06-26 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(102,1,8,'2026-06-27',NULL,NULL,NULL,0,0,NULL,'alpha','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(103,1,8,'2026-06-28','M','2026-06-28 07:00:00','2026-06-28 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(104,1,8,'2026-06-29','A','2026-06-29 14:00:00','2026-06-29 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(105,1,8,'2026-06-30','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(106,1,8,'2026-07-01','A','2026-07-01 14:00:00','2026-07-01 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(107,1,8,'2026-07-02','M','2026-07-02 07:00:00','2026-07-02 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(108,1,8,'2026-07-03','A','2026-07-03 14:00:00','2026-07-03 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(109,1,8,'2026-07-04','M','2026-07-04 07:20:00','2026-07-04 15:00:00',20,0,NULL,'late','submitted','2026-07-08 19:08:46','2026-07-08 19:08:46'),(110,1,8,'2026-07-05','A','2026-07-05 14:00:00','2026-07-05 22:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(111,1,8,'2026-07-06','M','2026-07-06 07:00:00','2026-07-06 15:00:00',0,0,NULL,'present','none','2026-07-08 19:08:46','2026-07-08 19:08:46'),(112,1,8,'2026-07-07','OFF',NULL,NULL,0,0,NULL,'off','none','2026-07-08 19:08:46','2026-07-08 19:08:46');

--
-- Table structure for table `hr_attendance_logs`
--

CREATE TABLE `hr_attendance_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned NOT NULL,
  `machine_id` varchar(60) DEFAULT NULL,
  `ts` datetime NOT NULL,
  `source` enum('machine','mobile_gps') NOT NULL DEFAULT 'machine',
  `photo` varchar(255) DEFAULT NULL,
  `lat` decimal(10,7) DEFAULT NULL,
  `lng` decimal(10,7) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_attendance_logs_property_employee_ts` (`property_id`,`employee_id`,`ts`),
  KEY `fk_hr_attendance_logs_employee` (`employee_id`),
  CONSTRAINT `fk_hr_attendance_logs_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_attendance_logs_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_attendance_logs`
--

INSERT INTO `hr_attendance_logs` VALUES (1,1,3,'FP-HK-01','2026-07-07 07:00:12','machine',NULL,NULL,NULL,'2026-07-08 19:08:46'),(2,1,3,'FP-HK-01','2026-07-07 15:01:40','machine',NULL,NULL,NULL,'2026-07-08 19:08:46'),(3,1,4,'FP-HK-01','2026-07-07 14:00:05','machine',NULL,NULL,NULL,'2026-07-08 19:08:46'),(4,1,4,'FP-HK-01','2026-07-07 22:03:22','machine',NULL,NULL,NULL,'2026-07-08 19:08:46'),(5,1,7,'FP-HK-01','2026-07-07 06:58:50','machine',NULL,NULL,NULL,'2026-07-08 19:08:46'),(6,1,7,'FP-HK-01','2026-07-07 15:00:33','machine',NULL,NULL,NULL,'2026-07-08 19:08:46'),(7,1,3,NULL,'2026-07-06 14:00:20','mobile_gps',NULL,NULL,NULL,'2026-07-08 19:08:46'),(8,1,3,NULL,'2026-07-06 22:02:05','mobile_gps',NULL,NULL,NULL,'2026-07-08 19:08:46');

--
-- Table structure for table `hr_briefing_acks`
--

CREATE TABLE `hr_briefing_acks` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `briefing_id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `ack_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_briefing_acks` (`briefing_id`,`user_id`),
  KEY `idx_hr_briefing_acks_user` (`user_id`),
  CONSTRAINT `fk_hr_briefing_acks_briefing` FOREIGN KEY (`briefing_id`) REFERENCES `hr_briefings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_briefing_acks_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_briefing_acks`
--

INSERT INTO `hr_briefing_acks` VALUES (1,1,504,'2026-07-08 20:14:02'),(2,1,514,'2026-07-08 20:14:02'),(3,1,525,'2026-07-08 20:14:02'),(4,1,529,'2026-07-08 20:14:02');

--
-- Table structure for table `hr_briefing_items`
--

CREATE TABLE `hr_briefing_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `briefing_id` int(10) unsigned NOT NULL,
  `text` varchar(500) NOT NULL,
  `source` enum('manual','auto') NOT NULL DEFAULT 'manual',
  `ai_suggested_class` enum('task','kpi_proposal','hotelfix_wo','info') DEFAULT NULL,
  `confirmed_class` enum('task','kpi_proposal','hotelfix_wo','info') DEFAULT NULL,
  `confirmed_by` int(10) unsigned DEFAULT NULL,
  `ref_id` bigint(20) unsigned DEFAULT NULL COMMENT 'id baris hasil (hr_tasks.id / work_orders.id / hr_kpi_definitions.id)',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_briefing_items_briefing` (`briefing_id`),
  KEY `idx_hr_briefing_items_confirmed_by` (`confirmed_by`),
  CONSTRAINT `fk_hr_briefing_items_briefing` FOREIGN KEY (`briefing_id`) REFERENCES `hr_briefings` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_briefing_items_confirmed_by` FOREIGN KEY (`confirmed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_briefing_items`
--

INSERT INTO `hr_briefing_items` VALUES (1,1,'2 tamu VIP arrival hari ini (Mr Kim - KR, Mme Dubois - FR) — siapkan welcome amenity sesuai SOP (DUMMY demo).','manual','info','info',514,NULL,'2026-07-08 19:08:46'),(2,1,'Kamar 1203 komplain kebersihan minggu lalu — perlu extra inspeksi Room Attendant (DUMMY demo).','manual','task','task',514,1,'2026-07-08 19:08:46'),(3,1,'Linen & amenities menipis, PA agar cross-check dgn Linen Attendant (DUMMY demo).','manual','info','info',514,NULL,'2026-07-08 19:08:46');

--
-- Table structure for table `hr_briefings`
--

CREATE TABLE `hr_briefings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `date` date NOT NULL,
  `scope` enum('resort','department') NOT NULL DEFAULT 'resort',
  `department` varchar(60) DEFAULT NULL COMMENT 'wajib bila scope=department',
  `sections` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'blok konten (guest, maintenance F16, dst)' CHECK (json_valid(`sections`)),
  `generated_at` datetime DEFAULT NULL,
  `edited_by` int(10) unsigned DEFAULT NULL,
  `published_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_briefings_property_date` (`property_id`,`date`),
  KEY `idx_hr_briefings_edited_by` (`edited_by`),
  CONSTRAINT `fk_hr_briefings_edited_by` FOREIGN KEY (`edited_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_briefings_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_briefings`
--

INSERT INTO `hr_briefings` VALUES (1,1,'2026-07-08','department','housekeeping','{\"guest\": \"Hari ini 2 arrival VIP (Mr Kim - KR, Mme Dubois - FR) — lihat Guest Cards (DUMMY demo).\", \"maintenance\": \"Tidak ada WO urgent baru untuk area kamar HK pagi ini (DUMMY demo).\", \"reminder\": \"Cross-check stok linen & amenities sebelum shift siang (DUMMY demo).\"}','2026-07-08 19:08:46',514,'2026-07-08 19:08:46','2026-07-08 19:08:46','2026-07-08 19:08:46');

--
-- Table structure for table `hr_challenge_results`
--

CREATE TABLE `hr_challenge_results` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `challenge_id` int(10) unsigned NOT NULL,
  `participant_id` int(10) unsigned DEFAULT NULL,
  `team` varchar(100) DEFAULT NULL,
  `score` decimal(10,2) DEFAULT NULL,
  `time_seconds` int(10) unsigned DEFAULT NULL,
  `rank` smallint(5) unsigned DEFAULT NULL,
  `judged_by` int(10) unsigned DEFAULT NULL,
  `evidence` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'array url foto/video' CHECK (json_valid(`evidence`)),
  `awarded` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`awarded`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_challenge_results_challenge` (`challenge_id`),
  KEY `idx_hr_challenge_results_participant` (`participant_id`),
  KEY `fk_hr_challenge_results_judged_by` (`judged_by`),
  CONSTRAINT `fk_hr_challenge_results_challenge` FOREIGN KEY (`challenge_id`) REFERENCES `hr_challenges` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_challenge_results_judged_by` FOREIGN KEY (`judged_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_challenge_results_participant` FOREIGN KEY (`participant_id`) REFERENCES `hr_employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_challenge_results`
--

INSERT INTO `hr_challenge_results` VALUES (1,1,3,NULL,95.00,900,1,514,'[\"challenge/1/participant3-demo.jpg (DUMMY)\"]','{\"prize\": \"Voucher spa (DUMMY demo)\"}','2026-07-08 20:14:02'),(2,1,7,NULL,90.00,960,2,514,'[\"challenge/1/participant7-demo.jpg (DUMMY)\"]',NULL,'2026-07-08 20:14:02');

--
-- Table structure for table `hr_challenges`
--

CREATE TABLE `hr_challenges` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `name` varchar(150) NOT NULL,
  `department` varchar(60) DEFAULT NULL,
  `type` enum('judged','timed','data_driven') NOT NULL,
  `metric` varchar(150) DEFAULT NULL,
  `rules` text DEFAULT NULL,
  `schedule` varchar(150) DEFAULT NULL,
  `prize` varchar(150) DEFAULT NULL,
  `budget_source` varchar(100) DEFAULT NULL,
  `competency_id` int(10) unsigned DEFAULT NULL,
  `status` enum('draft','open','running','closed','cancelled') NOT NULL DEFAULT 'draft',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_challenges_property_status` (`property_id`,`status`),
  KEY `idx_hr_challenges_competency` (`competency_id`),
  CONSTRAINT `fk_hr_challenges_competency` FOREIGN KEY (`competency_id`) REFERENCES `hr_competencies` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_challenges_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_challenges`
--

INSERT INTO `hr_challenges` VALUES (1,1,'HK Speed Cleaning Challenge (DUMMY demo)','housekeeping','timed','Waktu bersih kamar standar (menit)','Kamar checkout standar, dinilai waktu + checklist 30 titik lolos (DUMMY demo).','Mingguan tiap Jumat (DUMMY demo)','Voucher spa staff (DUMMY demo)','HR engagement budget (DUMMY demo)',5,'closed','2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,1,'Kreasi Konten Butterfly Sanctuary (DUMMY demo)',NULL,'judged','Engagement media sosial (like/share/komentar)','Video/foto edukasi Butterfly Sanctuary, dinilai kreativitas + akurasi (DUMMY demo).','Bulanan (DUMMY demo)','Sertifikat & poin service charge (DUMMY demo)',NULL,4,'open','2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_competencies`
--

CREATE TABLE `hr_competencies` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `code` varchar(20) NOT NULL COMMENT 'kode {PREFIX}-{nn} mis. HK-01, GEN-18',
  `name` varchar(150) NOT NULL,
  `tier` enum('core','functional','leadership') NOT NULL DEFAULT 'functional',
  `faculty_id` int(10) unsigned NOT NULL,
  `asset_category_id` int(10) unsigned DEFAULT NULL COMMENT 'NULL -> tidak sync ke skills FIX',
  `max_level` tinyint(3) unsigned NOT NULL DEFAULT 4 COMMENT '1 Tahu, 2 Bisa dgn supervisi, 3 Mandiri, 4 Trainer',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_competencies_property_code` (`property_id`,`code`),
  KEY `idx_hr_competencies_faculty` (`faculty_id`),
  KEY `idx_hr_competencies_asset_category` (`asset_category_id`),
  CONSTRAINT `fk_hr_competencies_asset_category` FOREIGN KEY (`asset_category_id`) REFERENCES `asset_categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_competencies_faculty` FOREIGN KEY (`faculty_id`) REFERENCES `hr_faculties` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_competencies_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_competencies`
--

INSERT INTO `hr_competencies` VALUES (1,1,'GEN-CORE','GEN core (generik) — nomor pasti menyusul impor KOMPETENSI-UNIVERSITY.xlsx','core',1,NULL,2,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(2,1,'GEN-18','Frasa dasar Perancis & Korea (base tamu utama)','core',1,NULL,4,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(3,1,'GEN-20','Antisipasi & silent service (gaya small/ultra-luxury hospitality)','core',1,NULL,4,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(4,1,'GEN-21','Butterfly Sanctuary — siklus metamorfosis & spesies unggulan (Troides helena)','core',1,NULL,4,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(5,1,'HK-01','Standar kebersihan kamar & area publik (checklist 30 titik)','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(6,1,'HK-03','Kompetensi inti Room Attendant','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(7,1,'HK-04','Kompetensi inti Room Attendant','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(8,1,'HK-08','Kompetensi bersama RA/PA (area & amenities)','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(9,1,'HK-09','Kompetensi Public Area Attendant','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(10,1,'HK-10','Kompetensi bersama PA/Coordinator','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(11,1,'HK-12','Linen & laundry handling','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(12,1,'HK-13','Kompetensi Linen Attendant (lanjutan)','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(13,1,'HK-14','Kompetensi bersama RA/PA','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(14,1,'HK-15','Kompetensi inti Room Attendant','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(15,1,'HK-16','Kompetensi Public Area Attendant','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(16,1,'HK-17','Kompetensi Public Area Attendant','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(17,1,'HK-18','Inspeksi kamar (checklist 30 titik)','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(18,1,'HK-19','Koordinasi PPM dengan Engineering','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(19,1,'HK-20','Penanganan laundry outsource','functional',2,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(20,1,'LDR-01','Kepemimpinan inti — prasyarat jalur SPV (LDR-L1)','leadership',1,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(21,1,'LDR-02','Kepemimpinan inti','leadership',1,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(22,1,'LDR-04','Kepemimpinan inti','leadership',1,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(23,1,'LDR-05','Kepemimpinan inti','leadership',1,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16'),(24,1,'LDR-07','Kepemimpinan inti','leadership',1,NULL,4,'2026-07-08 18:57:12','2026-07-09 13:48:16');

--
-- Table structure for table `hr_complaints`
--

CREATE TABLE `hr_complaints` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `source` enum('guest','internal') NOT NULL DEFAULT 'guest',
  `channel` enum('langsung','telepon','whatsapp','email','review_online','ota','lainnya') NOT NULL DEFAULT 'langsung',
  `guest_name` varchar(150) DEFAULT NULL COMMENT 'nama tamu; NULL utk komplain internal',
  `room` varchar(20) DEFAULT NULL,
  `department` varchar(60) DEFAULT NULL COMMENT 'dept tertuju, match kode hr_departments.code',
  `category` varchar(100) DEFAULT NULL,
  `severity` enum('low','medium','high') NOT NULL DEFAULT 'medium',
  `description` text NOT NULL,
  `status` enum('open','in_progress','resolved','closed') NOT NULL DEFAULT 'open',
  `resolution` text DEFAULT NULL,
  `reported_by` int(10) unsigned NOT NULL,
  `resolved_by` int(10) unsigned DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `resolved_at` datetime DEFAULT NULL,
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_complaints_property_status` (`property_id`,`status`),
  KEY `idx_hr_complaints_property_department` (`property_id`,`department`),
  KEY `fk_hr_complaints_reported_by` (`reported_by`),
  KEY `fk_hr_complaints_resolved_by` (`resolved_by`),
  CONSTRAINT `fk_hr_complaints_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_complaints_reported_by` FOREIGN KEY (`reported_by`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_complaints_resolved_by` FOREIGN KEY (`resolved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_complaints`
--

INSERT INTO `hr_complaints` VALUES (1,1,'guest','langsung','Demo Guest Satu','204','housekeeping','kebersihan kamar','medium','DUMMY — Tamu melapor kamar belum dibersihkan saat check-in siang.','open',NULL,1,NULL,'2026-07-09 14:09:43',NULL,'2026-07-09 14:09:43'),(2,1,'guest','whatsapp','Demo Guest Dua','112','front_office','proses check-in lambat','high','DUMMY — Tamu menunggu lebih dari 30 menit saat check-in, sempat komplain via WhatsApp resort.','open',NULL,1,NULL,'2026-07-09 14:09:43',NULL,'2026-07-09 14:09:43'),(3,1,'guest','review_online','Demo Guest Tiga',NULL,'kitchen','rasa makanan','low','DUMMY — Ulasan online menyebut menu sarapan kurang variatif.','resolved','DUMMY — Chef menambah 2 menu rotasi sarapan mingguan, follow-up ke tamu via email.',1,1,'2026-07-09 14:09:43','2026-07-09 14:09:43','2026-07-09 14:09:43'),(4,1,'guest','langsung','QC Test Guest','305','housekeeping','kebersihan','high','QC TEST - handuk kotor tidak diganti, tamu marah.','resolved','QC TEST - housekeeping sudah mengganti handuk, tamu diberi kompensasi.',905,900,'2026-07-09 15:21:08','2026-07-09 15:23:06','2026-07-09 15:23:06'),(5,1,'guest','email','QC Test Guest Medium','210','front_office','lambat','medium','QC TEST medium severity - proses checkout agak lama.','open',NULL,905,NULL,'2026-07-09 15:23:35',NULL,'2026-07-09 15:23:35');

--
-- Table structure for table `hr_contracts`
--

CREATE TABLE `hr_contracts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `employee_id` int(10) unsigned NOT NULL,
  `type` enum('pkwt','pkwtt') NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `file` varchar(255) DEFAULT NULL,
  `compensation_paid` decimal(14,2) DEFAULT NULL COMMENT 'kompensasi PKWT (1 bulan upah / 12 bln masa kerja, prorata)',
  `status` enum('draft','active','expired','terminated') NOT NULL DEFAULT 'draft',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_contracts_employee` (`employee_id`),
  KEY `idx_hr_contracts_end_date` (`end_date`),
  CONSTRAINT `fk_hr_contracts_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_contracts`
--

INSERT INTO `hr_contracts` VALUES (1,3,'pkwt','2025-01-10','2026-08-27','hr_contracts/3/pkwt-2025-demo.pdf (DUMMY)',NULL,'active','2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_courses`
--

CREATE TABLE `hr_courses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `faculty_id` int(10) unsigned NOT NULL,
  `competency_id` int(10) unsigned DEFAULT NULL,
  `title` varchar(150) NOT NULL,
  `week_of` date DEFAULT NULL,
  `deadline` date DEFAULT NULL,
  `materials` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'array {type: video|article|card, url/ref}' CHECK (json_valid(`materials`)),
  `mandatory_departments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'array nama departemen wajib, NULL = semua' CHECK (json_valid(`mandatory_departments`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_courses_property_faculty` (`property_id`,`faculty_id`),
  KEY `idx_hr_courses_competency` (`competency_id`),
  KEY `fk_hr_courses_faculty` (`faculty_id`),
  CONSTRAINT `fk_hr_courses_competency` FOREIGN KEY (`competency_id`) REFERENCES `hr_competencies` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_courses_faculty` FOREIGN KEY (`faculty_id`) REFERENCES `hr_faculties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_courses_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_courses`
--

INSERT INTO `hr_courses` VALUES (1,1,1,4,'Mengenal Butterfly Sanctuary Sanggraloka','2026-07-06','2026-07-12','[{\"type\": \"article\", \"ref\": \"materi/gen-21-butterfly.md\"}, {\"type\": \"card\", \"ref\": \"flashcard/troides-helena.json\"}]',NULL,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(2,1,1,2,'Frasa Dasar Perancis & Korea utk Tamu','2026-07-06','2026-07-12','[{\"type\": \"video\", \"ref\": \"materi/gen-18-frasa-fr-kr.mp4\"}, {\"type\": \"card\", \"ref\": \"flashcard/gen-18-frasa.json\"}]',NULL,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(3,1,2,5,'Checklist 30 Titik Kamar — Refresher Mingguan','2026-07-06','2026-07-12','[{\"type\": \"video\", \"ref\": \"materi/hk-01-checklist-30.mp4\"}, {\"type\": \"article\", \"ref\": \"materi/hk-01-standar-foto.md\"}]','[\"housekeeping\"]','2026-07-08 18:57:12','2026-07-08 18:57:12'),(4,1,2,14,'HK-L1-W01 — Dunia Housekeeping: Peran, Istilah & Alur Harian',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W01\",\"faculty\":\"HK\",\"level\":1,\"week\":1,\"competencies\":[\"HK-15\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W01.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W01-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(5,1,2,6,'HK-L1-W02 — Bed Making: Linen, Ukuran & Hospital Corner (Teori)',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W02\",\"faculty\":\"HK\",\"level\":1,\"week\":2,\"competencies\":[\"HK-03\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W02.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W02-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(6,1,2,8,'HK-L1-W03 — Chemical 101: Kode Warna, Dilusi & APD',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W03\",\"faculty\":\"HK\",\"level\":1,\"week\":3,\"competencies\":[\"HK-08\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W03.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W03-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(7,1,2,6,'HK-L1-W04 — Praktek: Bed Making + Chemical di Kamar Training',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W04\",\"faculty\":\"HK\",\"level\":1,\"week\":4,\"competencies\":[\"HK-03\",\"HK-08\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W04.html\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(8,1,2,5,'HK-L1-W05 — Make-up Room Sequence 1: Entry, Stripping, Dusting',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W05\",\"faculty\":\"HK\",\"level\":1,\"week\":5,\"competencies\":[\"HK-01\",\"HK-07\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W05.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W05-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(9,1,2,7,'HK-L1-W06 — Make-up Room Sequence 2: Bathroom & Finishing',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W06\",\"faculty\":\"HK\",\"level\":1,\"week\":6,\"competencies\":[\"HK-04\",\"HK-01\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W06.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W06-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(10,1,2,9,'HK-L1-W07 — Alat Kerja: Vacuum, Caddy & Perawatannya',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W07\",\"faculty\":\"HK\",\"level\":1,\"week\":7,\"competencies\":[\"HK-09\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W07.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W07-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(11,1,2,5,'HK-L1-W08 — Praktek: Make-up Room Penuh Didampingi',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W08\",\"faculty\":\"HK\",\"level\":1,\"week\":8,\"competencies\":[\"HK-01\",\"HK-04\",\"HK-09\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W08.html\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(12,1,2,NULL,'HK-L1-W09 — Turndown & Sentuhan Bali',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W09\",\"faculty\":\"HK\",\"level\":1,\"week\":9,\"competencies\":[\"HK-02\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W09.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W09-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(13,1,2,13,'HK-L1-W10 — Guest Request, Privasi Kamar & Lost-Found',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W10\",\"faculty\":\"HK\",\"level\":1,\"week\":10,\"competencies\":[\"HK-06\",\"HK-07\",\"HK-14\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W10.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W10-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(14,1,2,11,'HK-L1-W11 — Minibar, Linen Count & Komunikasi Status',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W11\",\"faculty\":\"HK\",\"level\":1,\"week\":11,\"competencies\":[\"HK-12\",\"HK-13\",\"HK-15\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W11.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W11-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(15,1,2,5,'HK-L1-W12 — UJI PRAKTEK LEVEL 1',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"HK-L1-W12\",\"faculty\":\"HK\",\"level\":1,\"week\":12,\"competencies\":[\"HK-01\",\"HK-02\",\"HK-03\",\"HK-04\",\"HK-06\",\"HK-07\",\"HK-08\",\"HK-09\",\"HK-12\",\"HK-13\",\"HK-14\",\"HK-15\"]},{\"type\":\"html\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W12.html\"},{\"type\":\"test\",\"ref\":\"university/03-housekeeping/level-1/HK-L1-W12-test.json\"}]','[\"housekeeping\"]','2026-07-08 19:12:48','2026-07-08 19:12:48'),(16,1,1,2,'GEN-18 — Kartu Frasa Perancis & Korea · Hotel University Sanggraloka',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-18-kartu-frasa-perancis-korea\",\"faculty\":\"GEN\",\"level\":1,\"week\":null,\"competencies\":[\"GEN-18\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-18-kartu-frasa-perancis-korea.html\"}]',NULL,'2026-07-08 19:12:48','2026-07-08 19:12:48'),(17,1,1,3,'Small Hospitality — Detail Kecil yang Bikin Tamu Merasa Istimewa',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-20-KARTU\",\"faculty\":\"GEN\",\"level\":1,\"week\":null,\"competencies\":[\"GEN-20\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-20-kartu-small-hospitality.html\"}]',NULL,'2026-07-08 19:12:48','2026-07-08 19:12:48'),(18,1,1,4,'Butterfly Sanctuary Sanggraloka — Kartu Edukasi Kupu-kupu',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-21-KARTU\",\"faculty\":\"GEN\",\"level\":1,\"week\":null,\"competencies\":[\"GEN-21\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-21-kartu-butterfly-sanctuary.html\"}]',NULL,'2026-07-08 19:12:48','2026-07-08 19:12:48'),(19,1,1,NULL,'GEN-L1-W01 — Grooming & Aturan Kerja: Kesan Pertama Sanggraloka',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W01\",\"faculty\":\"GEN\",\"level\":1,\"week\":1,\"competencies\":[\"GEN-01\",\"GEN-15\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W01.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W01-test.json\"}]',NULL,'2026-07-08 19:12:48','2026-07-08 19:12:48'),(20,1,1,NULL,'GEN-L1-W02 — Greeting, 10/5 Rule & Salam Sanggraloka',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W02\",\"faculty\":\"GEN\",\"level\":1,\"week\":2,\"competencies\":[\"GEN-02\",\"GEN-04\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W02.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W02-test.json\"}]',NULL,'2026-07-08 19:12:48','2026-07-08 19:12:48'),(21,1,1,NULL,'GEN-L1-W03 — Telephone Manner & Aplikasi Kerja',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W03\",\"faculty\":\"GEN\",\"level\":1,\"week\":3,\"competencies\":[\"GEN-03\",\"GEN-17\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W03.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W03-test.json\"}]',NULL,'2026-07-08 19:12:48','2026-07-08 19:12:48'),(22,1,1,NULL,'GEN-L1-W04 — PRAKTEK 1: Grooming, Greeting & Telepon (Roleplay)',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W04\",\"faculty\":\"GEN\",\"level\":1,\"week\":4,\"competencies\":[\"GEN-01\",\"GEN-02\",\"GEN-03\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W04.html\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(23,1,1,NULL,'GEN-L1-W05 — Product Knowledge: Resort & Ubud di Genggamanmu',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W05\",\"faculty\":\"GEN\",\"level\":1,\"week\":5,\"competencies\":[\"GEN-05\",\"GEN-06\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W05.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W05-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(24,1,1,NULL,'GEN-L1-W06 — Tri Hita Karana: Jiwa Pelayanan Sanggraloka',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W06\",\"faculty\":\"GEN\",\"level\":1,\"week\":6,\"competencies\":[\"GEN-07\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W06.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W06-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(25,1,1,NULL,'GEN-L1-W07 — Handling Complaint: Metode L.E.A.R.N & Upselling Halus',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W07\",\"faculty\":\"GEN\",\"level\":1,\"week\":7,\"competencies\":[\"GEN-08\",\"GEN-16\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W07.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W07-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(26,1,1,NULL,'GEN-L1-W08 — PRAKTEK 2: Resort Tour & Roleplay Complaint',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W08\",\"faculty\":\"GEN\",\"level\":1,\"week\":8,\"competencies\":[\"GEN-05\",\"GEN-06\",\"GEN-07\",\"GEN-08\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W08.html\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(27,1,1,NULL,'GEN-L1-W09 — K3 & Fire Safety: Bekerja Aman Setiap Hari',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W09\",\"faculty\":\"GEN\",\"level\":1,\"week\":9,\"competencies\":[\"GEN-09\",\"GEN-10\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W09.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W09-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(28,1,1,NULL,'GEN-L1-W10 — Hygiene, Privasi Tamu & Saling Menghormati',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W10\",\"faculty\":\"GEN\",\"level\":1,\"week\":10,\"competencies\":[\"GEN-12\",\"GEN-13\",\"GEN-14\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W10.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W10-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(29,1,1,2,'GEN-L1-W11 — Bonjour & Annyeonghaseyo: 15 Frasa Pertamamu',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W11\",\"faculty\":\"GEN\",\"level\":1,\"week\":11,\"competencies\":[\"GEN-18\",\"GEN-04\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W11.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W11-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(30,1,1,2,'GEN-L1-W12 — UJI LEVEL 1: Drill Evakuasi, P3K & Ujian Akhir',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L1-W12\",\"faculty\":\"GEN\",\"level\":1,\"week\":12,\"competencies\":[\"GEN-01\",\"GEN-02\",\"GEN-03\",\"GEN-04\",\"GEN-05\",\"GEN-06\",\"GEN-07\",\"GEN-08\",\"GEN-09\",\"GEN-10\",\"GEN-11\",\"GEN-12\",\"GEN-13\",\"GEN-14\",\"GEN-15\",\"GEN-16\",\"GEN-17\",\"GEN-18\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W12.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-1/GEN-L1-W12-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(31,1,1,3,'GEN-L2-W01 — Grooming & Courtesy: Naik Kelas',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W01\",\"faculty\":\"GEN\",\"level\":2,\"week\":1,\"competencies\":[\"GEN-01\",\"GEN-02\",\"GEN-20\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W01.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W01-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(32,1,1,NULL,'GEN-L2-W02 — Telepon & English: Praktek Harian',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W02\",\"faculty\":\"GEN\",\"level\":2,\"week\":2,\"competencies\":[\"GEN-03\",\"GEN-04\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W02.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W02-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(33,1,1,4,'GEN-L2-W03 — Product & Area Expert: Jago Jawab Tamu',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W03\",\"faculty\":\"GEN\",\"level\":2,\"week\":3,\"competencies\":[\"GEN-05\",\"GEN-06\",\"GEN-21\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W03.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W03-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(34,1,1,NULL,'GEN-L2-W04 — PRAKTEK 1: Mystery Guest Simulation',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W04\",\"faculty\":\"GEN\",\"level\":2,\"week\":4,\"competencies\":[\"GEN-01\",\"GEN-02\",\"GEN-03\",\"GEN-04\",\"GEN-05\",\"GEN-06\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W04.html\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(35,1,1,NULL,'GEN-L2-W05 — THK dalam Tindakan: Saat Tamu Kecewa, Kamu Turun Tangan',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W05\",\"faculty\":\"GEN\",\"level\":2,\"week\":5,\"competencies\":[\"GEN-07\",\"GEN-08\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W05.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W05-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(36,1,1,NULL,'GEN-L2-W06 — K3, Kebakaran & Gempa: Mata Awasmu Melindungi Semua Orang',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W06\",\"faculty\":\"GEN\",\"level\":2,\"week\":6,\"competencies\":[\"GEN-09\",\"GEN-10\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W06.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W06-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(37,1,1,NULL,'GEN-L2-W07 — P3K & Hygiene: Siap Bertindak di 60 Detik Pertama',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W07\",\"faculty\":\"GEN\",\"level\":2,\"week\":7,\"competencies\":[\"GEN-11\",\"GEN-12\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W07.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W07-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(38,1,1,NULL,'GEN-L2-W08 — PRAKTEK 2: Drill Evakuasi Fire & Gempa + Simulasi P3K',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W08\",\"faculty\":\"GEN\",\"level\":2,\"week\":8,\"competencies\":[\"GEN-09\",\"GEN-10\",\"GEN-11\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W08.html\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(39,1,1,NULL,'GEN-L2-W09 — Respect at Work & Privasi Tamu: Jaga Martabat, Jaga Data',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W09\",\"faculty\":\"GEN\",\"level\":2,\"week\":9,\"competencies\":[\"GEN-13\",\"GEN-14\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W09.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W09-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(40,1,1,NULL,'GEN-L2-W10 — Aturan Main & Sustainability: Cerita Hijau Sanggraloka',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W10\",\"faculty\":\"GEN\",\"level\":2,\"week\":10,\"competencies\":[\"GEN-15\",\"GEN-19\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W10.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W10-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(41,1,1,2,'GEN-L2-W11 — Upselling Natural, Apps & Frasa FR/KR Lancar',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W11\",\"faculty\":\"GEN\",\"level\":2,\"week\":11,\"competencies\":[\"GEN-16\",\"GEN-17\",\"GEN-18\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W11.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W11-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49'),(42,1,1,2,'GEN-L2-W12 — UJI PRAKTEK LEVEL 2',NULL,NULL,'[{\"type\":\"meta\",\"lesson_code\":\"GEN-L2-W12\",\"faculty\":\"GEN\",\"level\":2,\"week\":12,\"competencies\":[\"GEN-01\",\"GEN-02\",\"GEN-03\",\"GEN-04\",\"GEN-05\",\"GEN-06\",\"GEN-07\",\"GEN-08\",\"GEN-09\",\"GEN-10\",\"GEN-11\",\"GEN-12\",\"GEN-13\",\"GEN-14\",\"GEN-15\",\"GEN-16\",\"GEN-17\",\"GEN-18\",\"GEN-19\",\"GEN-20\",\"GEN-21\"]},{\"type\":\"html\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W12.html\"},{\"type\":\"test\",\"ref\":\"university/01-general-studies/level-2/GEN-L2-W12-test.json\"}]',NULL,'2026-07-08 19:12:49','2026-07-08 19:12:49');

--
-- Table structure for table `hr_departments`
--

CREATE TABLE `hr_departments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `code` varchar(60) NOT NULL COMMENT 'match persis kolom department (string) di hr_employees/hr_positions/hr_kpi_definitions/user_property_access',
  `name` varchar(150) NOT NULL,
  `division` varchar(60) DEFAULT NULL COMMENT 'NULL = belum ditetapkan HR (anti-karang; lengkapi via halaman department.php/edit HR)',
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_departments_property_code` (`property_id`,`code`),
  CONSTRAINT `fk_hr_departments_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_departments`
--

INSERT INTO `hr_departments` VALUES (1,1,'admin','Admin',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(2,1,'engineering','Engineering',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(3,1,'finance','Finance',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(4,1,'fnb','F&B',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(5,1,'front_office','Front Office',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(6,1,'housekeeping','Housekeeping',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(7,1,'hr','HR',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(8,1,'hrd','HRD',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(9,1,'it','IT',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(10,1,'kitchen','Kitchen',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(11,1,'sales','Sales',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(12,1,'security','Security',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51'),(13,1,'spa','Spa',NULL,1,'2026-07-09 13:48:51','2026-07-09 13:48:51');

--
-- Table structure for table `hr_discipline`
--

CREATE TABLE `hr_discipline` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned NOT NULL,
  `level` enum('coaching','sp1','sp2','sp3') NOT NULL,
  `category` varchar(100) NOT NULL,
  `chronology` text DEFAULT NULL,
  `evidence` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`evidence`)),
  `issued_by` int(10) unsigned NOT NULL,
  `valid_until` date DEFAULT NULL,
  `ack_at` datetime DEFAULT NULL,
  `ack_signature_hash` varchar(255) DEFAULT NULL,
  `objection_note` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_discipline_property_employee` (`property_id`,`employee_id`),
  KEY `idx_hr_discipline_issued_by` (`issued_by`),
  KEY `fk_hr_discipline_employee` (`employee_id`),
  CONSTRAINT `fk_hr_discipline_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_discipline_issued_by` FOREIGN KEY (`issued_by`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_discipline_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_discipline`
--

INSERT INTO `hr_discipline` VALUES (1,1,8,'coaching','Keterlambatan berulang (DUMMY skenario demo)','Tercatat terlambat >15 menit beberapa kali dalam 2 minggu terakhir (lihat hr_attendance_days, DUMMY demo). Dibicarakan informal oleh HK Coordinator, coaching note diterbitkan sbg dokumentasi.','[\"hr_attendance_days: employee_id=8\"]',514,'2026-10-06',NULL,NULL,NULL,'2026-07-08 19:08:46','2026-07-08 19:08:46'),(2,1,4,'coaching','Checklist kamar tidak lengkap saat inspeksi mendadak (DUMMY skenario demo)','Inspeksi mendadak Executive Housekeeper menemukan 2 titik checklist 30 titik terlewat (DUMMY demo, bukan insiden nyata). Coaching diberikan sbg pembinaan awal.','[\"hr_inspections: contoh demo, belum ada baris nyata\"]',504,'2026-10-06',NULL,NULL,NULL,'2026-07-08 19:08:46','2026-07-08 19:08:46');

--
-- Table structure for table `hr_documents`
--

CREATE TABLE `hr_documents` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `employee_id` int(10) unsigned NOT NULL,
  `type` enum('ktp','ijazah','sertifikat','kontrak','mcu','kitas','lainnya') NOT NULL,
  `title` varchar(150) NOT NULL,
  `file` varchar(255) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `reminder_days` smallint(5) unsigned DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_documents_employee` (`employee_id`),
  KEY `idx_hr_documents_expiry` (`expiry_date`),
  CONSTRAINT `fk_hr_documents_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_documents`
--

INSERT INTO `hr_documents` VALUES (1,1,'ktp','KTP — perlu perpanjangan alamat (DUMMY demo)','hr_documents/1/ktp-demo.jpg (DUMMY)','2026-07-28',30,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,7,'mcu','MCU Tahunan (DUMMY demo)','hr_documents/7/mcu-demo.pdf (DUMMY)','2026-08-04',30,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(3,1,'sertifikat','UAT Upload Test - DUMMY','hr_documents/1/5b74005daa7d88360e3980dd73434f29.pdf',NULL,60,'2026-07-09 16:09:02','2026-07-09 16:09:02'),(4,106,'ktp','ktp','hr_documents/1/719ef518d679be54d7e68b74abe9ff71.jpg',NULL,60,'2026-07-09 16:13:45','2026-07-09 16:13:45');

--
-- Table structure for table `hr_dw_pool`
--

CREATE TABLE `hr_dw_pool` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `full_name` varchar(150) NOT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `departments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'array departemen yang bisa dipanggil' CHECK (json_valid(`departments`)),
  `rating_avg` decimal(3,2) DEFAULT NULL,
  `last_called` date DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_dw_pool_property` (`property_id`),
  CONSTRAINT `fk_hr_dw_pool_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_dw_pool`
--

INSERT INTO `hr_dw_pool` VALUES (1,1,'Ketut Darma Wijaya (DUMMY demo)','0813000001 (DUMMY)','[\"housekeeping\"]',4.50,'2026-06-28','2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,1,'Nyoman Sri Astuti (DUMMY demo)','0813000002 (DUMMY)','[\"housekeeping\", \"fbs\"]',4.20,'2026-06-13','2026-07-08 20:14:02','2026-07-08 20:14:02'),(3,1,'Wayan Bagus Suartana (DUMMY demo)','0813000003 (DUMMY)','[\"engineering\"]',3.80,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(4,1,'Made Dwi Lestari (DUMMY demo)','0813000004 (DUMMY)','[\"housekeeping\"]',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_employee_comp`
--

CREATE TABLE `hr_employee_comp` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `employee_id` int(10) unsigned NOT NULL,
  `competency_id` int(10) unsigned NOT NULL,
  `level` tinyint(3) unsigned NOT NULL DEFAULT 1,
  `assessed_by` int(10) unsigned DEFAULT NULL,
  `assessed_at` datetime DEFAULT NULL,
  `evidence_type` enum('test','practical','cert') DEFAULT NULL,
  `evidence_ref_id` bigint(20) unsigned DEFAULT NULL COMMENT 'test_id atau dokumen sertifikat',
  `valid_until` date DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_employee_comp` (`employee_id`,`competency_id`),
  KEY `idx_hr_employee_comp_competency` (`competency_id`),
  KEY `idx_hr_employee_comp_assessed_by` (`assessed_by`),
  CONSTRAINT `fk_hr_employee_comp_assessed_by` FOREIGN KEY (`assessed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_employee_comp_competency` FOREIGN KEY (`competency_id`) REFERENCES `hr_competencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_employee_comp_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_employee_comp`
--

INSERT INTO `hr_employee_comp` VALUES (1,3,5,3,514,'2026-06-28 20:14:02','practical',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,4,5,2,514,'2026-06-28 20:14:02','practical',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(3,5,2,2,504,'2026-06-08 20:14:02','test',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(4,7,9,3,514,'2026-06-23 20:14:02','practical',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(5,8,11,2,514,'2026-06-23 20:14:02','practical',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(6,2,20,4,504,'2026-05-09 20:14:02','cert',NULL,NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(7,106,11,3,NULL,'2026-07-09 14:09:22','test',NULL,NULL,'2026-07-09 14:09:22','2026-07-09 14:09:22');

--
-- Table structure for table `hr_employees`
--

CREATE TABLE `hr_employees` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned DEFAULT NULL,
  `nik` varchar(20) DEFAULT NULL COMMENT 'nomor induk karyawan internal',
  `full_name` varchar(150) NOT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `ktp_no` varchar(20) DEFAULT NULL,
  `npwp` varchar(25) DEFAULT NULL,
  `bpjs_kes_no` varchar(30) DEFAULT NULL,
  `bpjs_tk_no` varchar(30) DEFAULT NULL,
  `ptkp_status` varchar(10) DEFAULT NULL COMMENT 'TK/0, K/1, dst',
  `address` varchar(255) DEFAULT NULL,
  `domicile` varchar(150) DEFAULT NULL,
  `banjar` varchar(100) DEFAULT NULL,
  `religion` varchar(30) DEFAULT NULL,
  `birth_date` date DEFAULT NULL,
  `marital` enum('single','married','divorced','widowed') DEFAULT NULL,
  `emergency_contact` varchar(150) DEFAULT NULL,
  `department` varchar(60) NOT NULL,
  `division` varchar(60) DEFAULT NULL,
  `position_id` int(10) unsigned DEFAULT NULL,
  `level` varchar(30) DEFAULT NULL,
  `employment_status` enum('dw','contract','permanent','casual','trainee') NOT NULL DEFAULT 'contract',
  `join_date` date DEFAULT NULL,
  `contract_end` date DEFAULT NULL,
  `supervisor_id` int(10) unsigned DEFAULT NULL,
  `bank_account` text DEFAULT NULL COMMENT 'ciphertext — nomor rekening & bank, enkripsi level aplikasi',
  `salary_grade` varchar(30) DEFAULT NULL,
  `sc_point` decimal(10,2) DEFAULT NULL COMMENT 'poin service charge',
  `uniform_size` varchar(10) DEFAULT NULL,
  `locker_no` varchar(20) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_employees_property_nik` (`property_id`,`nik`),
  KEY `idx_hr_employees_property_dept` (`property_id`,`department`),
  KEY `idx_hr_employees_user` (`user_id`),
  KEY `idx_hr_employees_position` (`position_id`),
  KEY `idx_hr_employees_supervisor` (`supervisor_id`),
  CONSTRAINT `fk_hr_employees_position` FOREIGN KEY (`position_id`) REFERENCES `hr_positions` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_employees_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_employees_supervisor` FOREIGN KEY (`supervisor_id`) REFERENCES `hr_employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_employees_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_employees`
--

INSERT INTO `hr_employees` VALUES (1,1,504,'HK-0001','I Putu Ngurah Sanglah',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',5,'hod','permanent','2019-03-01',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(2,1,514,'HK-0002','I Made Tapan Prawita',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',4,'coordinator','permanent','2020-06-15',NULL,1,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(3,1,525,'HK-0003','I Wayan Arsa Wijaya',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',1,'staff','contract','2022-01-10',NULL,2,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(4,1,526,'HK-0004','Putu Agus Rama Raysaka',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',1,'staff','contract','2022-04-05',NULL,2,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(5,1,527,'HK-0005','I Wayan Merta Nugraha',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',1,'staff','contract','2023-02-20',NULL,2,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(6,1,528,'HK-0006','I Putu Angga Ardita',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',1,'staff','contract','2023-07-11',NULL,2,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(7,1,529,'HK-0007','Ni Luh Made Satya Utami Putri',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',2,'staff','contract','2021-09-01',NULL,2,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(8,1,530,'HK-0008','I Komang Purnairawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping','housekeeping',3,'staff','contract','2021-11-15',NULL,2,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(9,1,1,NULL,'Sindu Pratama (Super Admin)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(10,1,2,NULL,'Rina Wijaya (Property Admin)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(11,1,3,NULL,'Bambang Chief Engineer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(12,1,4,NULL,'Candra Teknisi (AK3 Listrik)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(13,1,5,NULL,'Sari Housekeeping (Reporter)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(14,1,6,NULL,'Andi General Manager (Viewer)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(15,1,7,NULL,'Budi Santoso (Teknisi AC/Plumbing)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(16,1,8,NULL,'Agus Salim (Teknisi AC/Listrik)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(17,1,9,NULL,'Dedi Kurniawan (Teknisi Plumbing)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(18,1,10,NULL,'Rina Amelia (IT Staff Jaringan)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'it',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(19,1,11,NULL,'Joko Susilo (IT Staff CCTV/Guest)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'it',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(20,1,12,NULL,'Tono Haryanto (Staff Sipil Finishing)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(21,1,13,NULL,'Wawan Setiawan (Staff Sipil Basah)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(22,1,501,NULL,'I Komang Kariyana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(23,1,502,NULL,'Agus Putra Kirana SE',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(24,1,503,NULL,'I Kadek Yudiarta',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(25,1,505,NULL,'Moza Audina Sopharia',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(26,1,506,NULL,'I Wayan Eka Arsana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(27,1,507,NULL,'I Nyoman Suamba',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(28,1,508,NULL,'I Wayan Mumendra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(29,1,509,NULL,'Ni Wayan Sri Utami',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(30,1,510,NULL,'Ni Wayan Nanik Rudasni',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(31,1,511,NULL,'Ni Wayan Ariani Dewi',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(32,1,512,NULL,'Ni Kadek Diah Sukryaningsih',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(33,1,513,NULL,'I Kadek Sudiantara',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(34,1,515,NULL,'I Komang Selamet Gunawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(35,1,516,NULL,'I Nengah Nari',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(36,1,517,NULL,'I Wayan Karta',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(37,1,518,NULL,'Ida Bagus Putu Yasa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(38,1,519,NULL,'Sabariyanto',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(39,1,520,NULL,'Ni Komang Ayu Widyastuti',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(40,1,521,NULL,'Ni Wayan Sri Rahyuni',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(41,1,522,NULL,'I Made Suwana Putra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(42,1,523,NULL,'I Wayan Ariyasa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(43,1,524,NULL,'I Ketut Suryanto',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(44,1,531,NULL,'Kadek Yunita Tira Kusumadewi',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(45,1,532,NULL,'Ni Kadek Sintya Dewi',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(46,1,533,NULL,'Jhon Ayung Gideon Belopa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(47,1,534,NULL,'I Nyoman Arya Candrayana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'it',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(48,1,535,NULL,'Ni Nyoman Trisna',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(49,1,536,NULL,'Ni Nyoman Kartini',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(50,1,537,NULL,'I Putu Tegar Mahesaputra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(51,1,538,NULL,'I Komang Ery Sancahya Pramana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(52,1,539,NULL,'Ni Kadek Dwiyani',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(53,1,540,NULL,'I Desak Gede Sri Mahayani',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(54,1,541,NULL,'I Nyoman Sugi Nandika Putra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(55,1,542,NULL,'I Wayan Muliada Artawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(56,1,543,NULL,'I Kadek Yogi Suarmana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(57,1,544,NULL,'I Ketut Agus Darmika',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(58,1,545,NULL,'Fenny Handayani',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(59,1,546,NULL,'Putu Dwika Suyantiari',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(60,1,547,NULL,'I Gusti Ngurah Agung Army Dwijaya',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'security',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(61,1,548,NULL,'Desak Made Alit Puspitawati',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(62,1,549,NULL,'I Made Arindia',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(63,1,550,NULL,'I Nyoman Yogi Putra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(64,1,551,NULL,'I Made Darmayasa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'security',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(65,1,552,NULL,'I Wayan Wira Adnyana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(66,1,553,NULL,'I Made Sutapa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'fnb',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(67,1,554,NULL,'Ni Komang Juni Ari',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(68,1,555,NULL,'I Putu Suardika',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(69,1,556,NULL,'Ni Kadek Dwi Supriyanti',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(70,1,557,NULL,'I Wayan Suta Maryawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(71,1,558,NULL,'Ni Komang Safitri',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'hrd',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(72,1,559,NULL,'Gusti Ngurah Agung Juniawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'security',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(73,1,560,NULL,'I Wayan Yadnya Putra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'security',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(74,1,561,NULL,'Anak Agung Ayu Rai Asti',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(75,1,562,NULL,'Ni Wayan Ratni',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(76,1,563,NULL,'Ngakan Made Wityadnya',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(77,1,564,NULL,'I Wayan Putra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'security',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(78,1,565,NULL,'I Ketut Agus Adi Pranata',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(79,1,566,NULL,'I Kadek Kayobi Sudarsana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(80,1,567,NULL,'I Wayan Suartana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(81,1,568,NULL,'Ni Wayan Rupiani',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(82,1,569,NULL,'Ni Komang Erawati',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(83,1,570,NULL,'I Kadek Windu Saputra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(84,1,571,NULL,'I Komang Diantara',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(85,1,572,NULL,'Sang Putu Tirtayana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(86,1,573,NULL,'Bertrand Arion Jinarakshita',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'kitchen',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(87,1,574,NULL,'I Komang Sukra',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(88,1,575,NULL,'I Wayan Balik Antara',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(89,1,576,NULL,'I Komang Budha Galung',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(90,1,577,NULL,'Gede Angga Prawira',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(91,1,578,NULL,'Ni Wayan Novi Yanti',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(92,1,579,NULL,'Ni Putu Eka Sumartini',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(93,1,580,NULL,'I Wayan Wisna',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(94,1,581,NULL,'Ni Kadek Wahyuni',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(95,1,582,NULL,'Ni Kadek Rita Juliana',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(96,1,583,NULL,'I Putu Oka Mardita',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(97,1,584,NULL,'Ni Made Srinadi',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(98,1,585,NULL,'Ni Wayan Yutini',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(99,1,586,NULL,'Anak Agung Raka Darma Putrawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'security',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(100,1,587,NULL,'Ni Wayan Eva Yama Yanti',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(101,1,588,NULL,'Wayan Yuda Antara',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'front_office',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(102,1,589,NULL,'Ni Komang Patmawati',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'spa',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(103,1,590,NULL,'Dewa Ayu Ari Sulasmi',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(104,1,591,NULL,'I Dewa Gede Janu Hartono',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'admin',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(105,1,592,NULL,'I Wayan Eka Sutarajaya',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'engineering',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(106,1,900,NULL,'[QC] Demo GM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(107,1,901,NULL,'[QC] Demo HC Manager',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'hr',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(108,1,902,NULL,'[QC] Demo Staf HR',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'hr',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(109,1,903,NULL,'[QC] Demo Financial Controller',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'finance',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(110,1,904,NULL,'[QC] Demo Supervisor',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(111,1,905,NULL,'[QC] Demo Karyawan',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'housekeeping',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(112,1,906,NULL,'[QC] Demo Sales Manager',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(113,1,907,NULL,'[QC] Demo Sales',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(114,1,908,NULL,'[QC] Demo Event & Wedding Mgr',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35'),(115,1,909,NULL,'[QC] Demo Graphic Design',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'sales',NULL,NULL,NULL,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2026-07-08 23:58:35','2026-07-08 23:58:35');

--
-- Table structure for table `hr_exit`
--

CREATE TABLE `hr_exit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `employee_id` int(10) unsigned NOT NULL,
  `checklist` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`checklist`)),
  `interview` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`interview`)),
  `reason` varchar(255) DEFAULT NULL,
  `last_day` date DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_exit_employee` (`employee_id`),
  CONSTRAINT `fk_hr_exit_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_exit`
--

INSERT INTO `hr_exit` VALUES (1,3,'{\"seragam_dikembalikan\": false, \"locker_dikosongkan\": false, \"akun_dinonaktifkan\": false}','{\"alasan_utama\": \"Kontrak PKWT tidak diperpanjang (DUMMY demo)\", \"catatan\": \"Kinerja baik, tidak ada isu disiplin (DUMMY demo)\"}','Kontrak PKWT berakhir, tidak diperpanjang (DUMMY demo)','2026-08-27','2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_faculties`
--

CREATE TABLE `hr_faculties` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `code` varchar(10) NOT NULL COMMENT 'GEN, FO, HK, FBS, BAR, KIT, ENG, SPA, WEL, SEC, GRD, SLS, ADM, LDR',
  `name` varchar(150) NOT NULL,
  `head_user_id` int(10) unsigned DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_faculties_property_code` (`property_id`,`code`),
  KEY `idx_hr_faculties_head` (`head_user_id`),
  CONSTRAINT `fk_hr_faculties_head` FOREIGN KEY (`head_user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_faculties_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_faculties`
--

INSERT INTO `hr_faculties` VALUES (1,1,'GEN','General Studies',NULL,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(2,1,'HK','Housekeeping',NULL,'2026-07-08 18:57:12','2026-07-08 18:57:12');

--
-- Table structure for table `hr_grievances`
--

CREATE TABLE `hr_grievances` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned DEFAULT NULL COMMENT 'NULL = anonim',
  `channel` enum('normal','whistle') NOT NULL DEFAULT 'normal',
  `text` text NOT NULL,
  `status` enum('open','investigating','resolved','closed') NOT NULL DEFAULT 'open',
  `handled_by` int(10) unsigned DEFAULT NULL COMMENT 'akses terbatas (HC Dir/GM)',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_grievances_property_status` (`property_id`,`status`),
  KEY `idx_hr_grievances_employee` (`employee_id`),
  KEY `fk_hr_grievances_handled_by` (`handled_by`),
  CONSTRAINT `fk_hr_grievances_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_grievances_handled_by` FOREIGN KEY (`handled_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_grievances_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_grievances`
--

INSERT INTO `hr_grievances` VALUES (1,1,7,'normal','Usul: sediakan tambahan kipas angin di area loker staff HK (DUMMY demo).','open',NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,1,NULL,'normal','[eNPS 9] Lingkungan kerja nyaman, komunikasi antar-shift lancar (DUMMY demo).','open',NULL,'2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_guest_cards`
--

CREATE TABLE `hr_guest_cards` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `import_id` int(10) unsigned NOT NULL,
  `date` date NOT NULL,
  `section` enum('arrival','inhouse','departure') NOT NULL,
  `room` varchar(20) DEFAULT NULL,
  `room_type` varchar(80) DEFAULT NULL,
  `guest_name` varchar(160) NOT NULL,
  `pax` smallint(5) unsigned DEFAULT NULL,
  `ci` date DEFAULT NULL,
  `co` date DEFAULT NULL,
  `vip` enum('none','vip1','vip2','vip3') NOT NULL DEFAULT 'none',
  `source` varchar(60) DEFAULT NULL,
  `language_hint` varchar(10) DEFAULT NULL COMMENT 'FR/KR/EN/ID dst',
  `occasion` varchar(100) DEFAULT NULL,
  `family_rooms` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'array nomor kamar 1 keluarga' CHECK (json_valid(`family_rooms`)),
  `expires_at` datetime DEFAULT NULL,
  `attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'array {text, type(dietary|spa|bed|transfer|occasion|security|inclusion|care), depts:[...]}' CHECK (json_valid(`attributes`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_guest_cards_property_date_section` (`property_id`,`date`,`section`),
  KEY `idx_hr_guest_cards_import` (`import_id`),
  CONSTRAINT `fk_hr_guest_cards_import` FOREIGN KEY (`import_id`) REFERENCES `hr_guest_imports` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_guest_cards_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_guest_cards`
--

INSERT INTO `hr_guest_cards` VALUES (1,1,1,'2026-07-08','arrival','201','Premiere Private Pool Villa','Demo Guest — Kim Min-jun (Mr Kim, VIP President)',2,'2026-07-08','2026-07-11','vip1','Direct Website (DUMMY)','KR','Business Retreat (DUMMY)',NULL,'2026-07-09 00:00:00','[{\"text\": \"Tamu VIP1 President — koordinasi welcome khusus (DUMMY demo)\", \"type\": \"security\", \"depts\": [\"security\", \"front_office\"]}, {\"text\": \"Suka teh hijau, hindari produk susu (DUMMY demo)\", \"type\": \"dietary\", \"depts\": [\"fnb\"]}]','2026-07-08 19:08:46','2026-07-08 19:08:46'),(2,1,1,'2026-07-08','arrival','305','Deluxe Private Pool Villa','Demo Guest — Mme Dubois (Honeymoon)',2,'2026-07-08','2026-07-12','vip2','Travel Agent (DUMMY)','FR','Honeymoon',NULL,'2026-07-09 00:00:00','[{\"text\": \"Honeymoon — dekorasi kamar & petal bunga (DUMMY demo)\", \"type\": \"occasion\", \"depts\": [\"housekeeping\", \"fnb\"]}, {\"text\": \"Booking spa couple H+1 (DUMMY demo)\", \"type\": \"spa\", \"depts\": [\"spa\"]}]','2026-07-08 19:08:46','2026-07-08 19:08:46'),(3,1,1,'2026-07-08','inhouse','102','Deluxe Suite','Demo Guest — Mr & Mrs Tanaka',2,'2026-07-06','2026-07-09','none','OTA (DUMMY)','EN',NULL,NULL,'2026-07-09 00:00:00','[{\"text\": \"Minta extra bantal & selimut tambahan (DUMMY demo)\", \"type\": \"bed\", \"depts\": [\"housekeeping\"]}]','2026-07-08 19:08:46','2026-07-08 19:08:46'),(4,1,1,'2026-07-08','inhouse','210','Premiere Suite','Demo Guest — Family Dupont',4,'2026-07-07','2026-07-10','none','Direct Website (DUMMY)','FR','Family Trip (DUMMY)','[\"210\", \"211\"]','2026-07-09 00:00:00','[{\"text\": \"Anak alergi kacang, koordinasi menu dapur (DUMMY demo)\", \"type\": \"dietary\", \"depts\": [\"kitchen\", \"fnb\"]}]','2026-07-08 19:08:46','2026-07-08 19:08:46'),(5,1,1,'2026-07-08','inhouse','407','Deluxe Suite','Demo Guest — Mr Anderson',1,'2026-07-05','2026-07-10','none','Corporate (DUMMY)','EN',NULL,NULL,'2026-07-09 00:00:00','[{\"text\": \"AC kamar kurang dingin, sudah dilaporkan ke Engineering (DUMMY demo)\", \"type\": \"care\", \"depts\": [\"engineering\"]}]','2026-07-08 19:08:46','2026-07-08 19:08:46'),(6,1,1,'2026-07-08','departure','118','Deluxe Suite','Demo Guest — Ms Chen',1,'2026-07-04','2026-07-08','none','OTA (DUMMY)','EN',NULL,NULL,'2026-07-09 00:00:00','[{\"text\": \"Late check-out disetujui s/d 14:00 (DUMMY demo)\", \"type\": \"inclusion\", \"depts\": [\"front_office\"]}]','2026-07-08 19:08:46','2026-07-08 19:08:46');

--
-- Table structure for table `hr_guest_imports`
--

CREATE TABLE `hr_guest_imports` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `date` date NOT NULL,
  `file` varchar(255) NOT NULL,
  `imported_by` int(10) unsigned DEFAULT NULL,
  `rows_arrival` int(10) unsigned NOT NULL DEFAULT 0,
  `rows_inhouse` int(10) unsigned NOT NULL DEFAULT 0,
  `rows_departure` int(10) unsigned NOT NULL DEFAULT 0,
  `parsed_at` datetime DEFAULT NULL,
  `ai_cost_idr` decimal(12,2) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_guest_imports_property_date` (`property_id`,`date`),
  KEY `fk_hr_guest_imports_imported_by` (`imported_by`),
  CONSTRAINT `fk_hr_guest_imports_imported_by` FOREIGN KEY (`imported_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_guest_imports_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_guest_imports`
--

INSERT INTO `hr_guest_imports` VALUES (1,1,'2026-07-08','guest_imports/demo_guest_list.xlsx (DUMMY)',531,2,3,1,'2026-07-08 19:08:46',NULL,'2026-07-08 19:08:46');

--
-- Table structure for table `hr_handover_logs`
--

CREATE TABLE `hr_handover_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `department` varchar(60) NOT NULL COMMENT 'non-engineering (handover engineering ada di HotelFix)',
  `shift` enum('M','A','N') NOT NULL,
  `notes` text DEFAULT NULL,
  `by_user_id` int(10) unsigned NOT NULL,
  `ack_by` int(10) unsigned DEFAULT NULL,
  `ack_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_handover_logs_property_dept` (`property_id`,`department`,`shift`),
  KEY `idx_hr_handover_logs_by` (`by_user_id`),
  KEY `fk_hr_handover_logs_ack_by` (`ack_by`),
  CONSTRAINT `fk_hr_handover_logs_ack_by` FOREIGN KEY (`ack_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_handover_logs_by` FOREIGN KEY (`by_user_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_handover_logs_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_handover_logs`
--

INSERT INTO `hr_handover_logs` VALUES (1,1,'housekeeping','A','Kamar 1203 sudah dibersihkan ulang pasca komplain; linen menipis di lantai 12 (DUMMY demo).',514,504,'2026-07-08 18:14:02','2026-07-08 20:14:02'),(2,1,'front_office','N','2 arrival VIP besok pagi (Mr Kim, Mme Dubois) — welcome amenity sudah disiapkan HK (DUMMY demo).',531,NULL,NULL,'2026-07-08 20:14:02');

--
-- Table structure for table `hr_incidents`
--

CREATE TABLE `hr_incidents` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `type` enum('guest','loss','safety') NOT NULL,
  `description` text NOT NULL,
  `photos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`photos`)),
  `location_id` int(10) unsigned DEFAULT NULL,
  `reported_by` int(10) unsigned NOT NULL,
  `routed_to` varchar(60) DEFAULT NULL COMMENT 'departemen tujuan',
  `status` enum('open','investigating','resolved','closed') NOT NULL DEFAULT 'open',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_incidents_property_status` (`property_id`,`status`),
  KEY `idx_hr_incidents_location` (`location_id`),
  KEY `idx_hr_incidents_reported_by` (`reported_by`),
  CONSTRAINT `fk_hr_incidents_location` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_incidents_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_incidents_reported_by` FOREIGN KEY (`reported_by`) REFERENCES `users` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_incidents`
--

INSERT INTO `hr_incidents` VALUES (1,1,'guest','Tamu komplain AC kamar 1202 kurang dingin (DUMMY demo).',NULL,2,525,'engineering','resolved','2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,1,'safety','Lantai licin dekat Sunken Pool Bar, dipasang tanda peringatan sementara (DUMMY demo).',NULL,8,529,'engineering','investigating','2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_inspections`
--

CREATE TABLE `hr_inspections` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `department` varchar(60) NOT NULL,
  `template` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'checklist titik inspeksi' CHECK (json_valid(`template`)),
  `scored_by` int(10) unsigned DEFAULT NULL,
  `employee_id` int(10) unsigned DEFAULT NULL COMMENT 'yang diinspeksi (mis. RA pemilik kamar)',
  `location_id` int(10) unsigned DEFAULT NULL,
  `score` decimal(5,2) DEFAULT NULL,
  `photos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`photos`)),
  `ts` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_inspections_property_dept_ts` (`property_id`,`department`,`ts`),
  KEY `idx_hr_inspections_employee` (`employee_id`),
  KEY `idx_hr_inspections_location` (`location_id`),
  KEY `fk_hr_inspections_scored_by` (`scored_by`),
  CONSTRAINT `fk_hr_inspections_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_inspections_location` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_inspections_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_inspections_scored_by` FOREIGN KEY (`scored_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_inspections`
--

INSERT INTO `hr_inspections` VALUES (1,1,'housekeeping','[\"Kebersihan kamar mandi\", \"Kerapian tempat tidur\", \"Kelengkapan amenities\"]',514,3,1,92.50,NULL,'2026-07-07 20:14:02'),(2,1,'housekeeping','[\"Kebersihan kamar mandi\", \"Kerapian tempat tidur\", \"Kelengkapan amenities\"]',504,5,4,78.00,NULL,'2026-07-05 20:14:02');

--
-- Table structure for table `hr_kpi_definitions`
--

CREATE TABLE `hr_kpi_definitions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `department` varchar(60) NOT NULL,
  `position_id` int(10) unsigned DEFAULT NULL COMMENT 'NULL = indikator level departemen',
  `name` varchar(200) NOT NULL,
  `target` varchar(100) NOT NULL COMMENT 'nilai target sbg teks (mis. >=95%, <=2/bulan)',
  `unit` varchar(30) DEFAULT NULL,
  `weight` decimal(5,2) NOT NULL COMMENT 'bobot %',
  `source` enum('attendance','training','discipline','checklist','hotelfix_wo','manual','inspection','task') NOT NULL COMMENT '''task'' = dihitung OTOMATIS dari completion hr_tasks bertaut (bukan input manual) -- lihat HrKpiService::taskKpiStats().',
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_kpi_definitions_property_dept` (`property_id`,`department`),
  KEY `idx_hr_kpi_definitions_position` (`position_id`),
  CONSTRAINT `fk_hr_kpi_definitions_position` FOREIGN KEY (`position_id`) REFERENCES `hr_positions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_kpi_definitions_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_kpi_definitions`
--

INSERT INTO `hr_kpi_definitions` VALUES (1,1,'housekeeping',NULL,'Skor inspeksi kamar (checklist 30 titik)','>=95','%',30.00,'inspection',1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(2,1,'housekeeping',NULL,'Komplain kebersihan tamu','<=2','komplain/bulan',20.00,'manual',1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(3,1,'housekeeping',NULL,'Produktivitas (kamar selesai vs target manning)','=100','%',15.00,'checklist',1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(4,1,'housekeeping',NULL,'Turnaround kamar check-out -> vacant-ready','<=2/4','jam',15.00,'hotelfix_wo',1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(5,1,'housekeeping',NULL,'Linen & amenities loss','<=1.5','% nilai stok',10.00,'manual',1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(6,1,'housekeeping',NULL,'Kompetensi tim (completion course + skill matrix HK inti Lv3)','100/80','% course / % tim Lv3',10.00,'training',1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(7,1,'housekeeping',NULL,'Penyelesaian task tepat waktu (auto dari Universal Task)','0','%',0.00,'task',1,'2026-07-08 23:45:14','2026-07-08 23:45:14'),(8,1,'sales',NULL,'Penyelesaian task tepat waktu','0','%',0.00,'task',1,'2026-07-09 14:02:05','2026-07-09 14:02:05');

--
-- Table structure for table `hr_kpi_scores`
--

CREATE TABLE `hr_kpi_scores` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned DEFAULT NULL,
  `department` varchar(60) DEFAULT NULL COMMENT 'diisi bila skor level departemen (employee_id NULL)',
  `period` char(7) NOT NULL COMMENT 'YYYY-MM',
  `component_scores` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`component_scores`)),
  `total` decimal(5,2) DEFAULT NULL,
  `published_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_kpi_scores_property_period` (`property_id`,`period`),
  KEY `idx_hr_kpi_scores_employee` (`employee_id`,`period`),
  CONSTRAINT `fk_hr_kpi_scores_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_kpi_scores_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_kpi_scores`
--

INSERT INTO `hr_kpi_scores` VALUES (1,1,NULL,'housekeeping','2026-07','{\"skor_inspeksi_kamar_pct\": 96.5, \"komplain_kebersihan_per_bulan\": 1, \"produktivitas_pct\": 98.0, \"turnaround_checkout_jam\": 1.8, \"linen_loss_pct\": 1.1, \"kompetensi_tim_pct\": 82.0, \"catatan\": \"Angka DUMMY demo, bukan hasil pengukuran nyata\"}',94.20,'2026-07-06 19:08:46','2026-07-08 19:08:46');

--
-- Table structure for table `hr_leave_types`
--

CREATE TABLE `hr_leave_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `name` varchar(100) NOT NULL,
  `quota` smallint(5) unsigned DEFAULT NULL COMMENT 'hari/tahun, NULL = tanpa kuota tetap',
  `requires_doc` tinyint(1) NOT NULL DEFAULT 0,
  `requires_gm` tinyint(1) NOT NULL DEFAULT 0,
  `paid` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_leave_types_property` (`property_id`),
  CONSTRAINT `fk_hr_leave_types_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_leave_types`
--

INSERT INTO `hr_leave_types` VALUES (1,1,'Cuti Tahunan',12,0,0,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(2,1,'Sakit',NULL,1,0,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(3,1,'Ijin Adat Bali (odalan/ngaben/potong gigi)',NULL,0,0,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(4,1,'Cuti Melahirkan',90,1,1,1,'2026-07-08 18:57:12','2026-07-08 18:57:12'),(5,1,'Ijin Tanpa Gaji (Unpaid)',NULL,0,1,0,'2026-07-08 18:57:12','2026-07-08 18:57:12');

--
-- Table structure for table `hr_leaves`
--

CREATE TABLE `hr_leaves` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned NOT NULL,
  `type_id` int(10) unsigned NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `doc_file` varchar(255) DEFAULT NULL,
  `status` enum('draft','submitted','approved_spv','approved_hod','approved_hr','approved_gm','rejected','cancelled') NOT NULL DEFAULT 'draft',
  `approvals` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '{spv:{by,at}, hod:{...}, hr:{...}, gm:{...}}' CHECK (json_valid(`approvals`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_leaves_property_status` (`property_id`,`status`),
  KEY `idx_hr_leaves_employee` (`employee_id`),
  KEY `idx_hr_leaves_type` (`type_id`),
  CONSTRAINT `fk_hr_leaves_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_leaves_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_leaves_type` FOREIGN KEY (`type_id`) REFERENCES `hr_leave_types` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_leaves`
--

INSERT INTO `hr_leaves` VALUES (1,1,5,1,'2026-06-29','2026-06-30','Pulang kampung acara keluarga (DUMMY demo)',NULL,'approved_hod','{\"spv\": {\"by\": 514, \"at\": \"2026-06-27 00:00:00\"}, \"hod\": {\"by\": 504, \"at\": \"2026-06-28 00:00:00\"}}','2026-07-08 19:08:46','2026-07-08 19:08:46'),(2,1,7,3,'2026-07-14','2026-07-14','Upacara odalan di banjar (tanggal DUMMY demo)',NULL,'approved_hod','{\"spv\":{\"by\":900,\"at\":\"2026-07-08 23:50:26\"},\"hod\":{\"by\":900,\"at\":\"2026-07-09 16:03:16\"}}','2026-07-08 19:08:46','2026-07-09 16:03:16'),(3,1,6,2,'2026-07-07','2026-07-08','Demam, menunggu surat keterangan dokter (DUMMY demo)',NULL,'submitted',NULL,'2026-07-08 19:08:46','2026-07-08 19:08:46'),(4,1,6,3,'2026-07-08','2026-07-10','odalan',NULL,'submitted',NULL,'2026-07-08 23:50:06','2026-07-08 23:50:06'),(5,1,106,1,'2026-07-16','2026-07-18','urusan keluarga',NULL,'approved_gm','{\"spv\":{\"by\":900,\"at\":\"2026-07-09 16:04:07\"},\"hod\":{\"by\":900,\"at\":\"2026-07-09 16:04:11\"},\"hr\":{\"by\":900,\"at\":\"2026-07-09 16:04:13\"},\"gm\":{\"by\":900,\"at\":\"2026-07-09 16:04:15\"}}','2026-07-09 16:04:02','2026-07-09 16:04:15');

--
-- Table structure for table `hr_loans`
--

CREATE TABLE `hr_loans` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `employee_id` int(10) unsigned NOT NULL,
  `amount` decimal(14,2) NOT NULL,
  `installments` tinyint(3) unsigned NOT NULL DEFAULT 1,
  `balance` decimal(14,2) NOT NULL,
  `approvals` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`approvals`)),
  `status` enum('requested','approved','rejected','active','settled','cancelled') NOT NULL DEFAULT 'requested',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_loans_property_employee` (`property_id`,`employee_id`),
  KEY `fk_hr_loans_employee` (`employee_id`),
  CONSTRAINT `fk_hr_loans_employee` FOREIGN KEY (`employee_id`) REFERENCES `hr_employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_loans_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_loans`
--

INSERT INTO `hr_loans` VALUES (1,1,8,2000000.00,4,1500000.00,'{\"hod\": {\"by\": 504, \"at\": \"2026-06-18 20:14:02\"}}','active','2026-07-08 20:14:02','2026-07-08 20:14:02');

--
-- Table structure for table `hr_lost_found`
--

CREATE TABLE `hr_lost_found` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `item` varchar(200) NOT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `location_id` int(10) unsigned DEFAULT NULL,
  `found_by` int(10) unsigned NOT NULL,
  `stored_at` varchar(100) DEFAULT NULL,
  `returned_to` varchar(150) DEFAULT NULL,
  `status` enum('stored','claimed','disposed','handed_to_authority') NOT NULL DEFAULT 'stored',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_hr_lost_found_property_status` (`property_id`,`status`),
  KEY `idx_hr_lost_found_location` (`location_id`),
  KEY `idx_hr_lost_found_found_by` (`found_by`),
  CONSTRAINT `fk_hr_lost_found_found_by` FOREIGN KEY (`found_by`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_lost_found_location` FOREIGN KEY (`location_id`) REFERENCES `locations` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_lost_found_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `hr_lost_found`
--

INSERT INTO `hr_lost_found` VALUES (1,1,'Dompet kulit coklat (DUMMY demo)',NULL,1,525,'Loker HRD (DUMMY demo)',NULL,'stored','2026-07-08 20:14:02','2026-07-08 20:14:02'),(2,1,'Kacamata renang anak (DUMMY demo)',NULL,8,529,'Loker HRD (DUMMY demo)','Tamu kamar 1201 (DUMMY demo)','claimed','2026-07-08 20:14:02','2026-07-08 20:14:02'),(3,1,'Payung lipat hitam (DUMMY demo)',NULL,1,525,'Loker HRD (DUMMY demo)',NULL,'disposed','2026-07-09 16:13:38','2026-07-09 16:13:38'),(4,1,'Charger HP tertinggal di lobby (DUMMY demo)',NULL,8,529,NULL,NULL,'handed_to_authority','2026-07-09 16:13:38','2026-07-09 16:13:38'),(5,1,'Topi pantai biru (QC test verifikasi)',NULL,1,905,'Meja depan security','Tamu Kamar 1201 (QC verifikasi)','claimed','2026-07-09 16:16:37','2026-07-09 16:17:24');

--
-- Table structure for table `hr_mod_roster`
--

CREATE TABLE `hr_mod_roster` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `property_id` int(10) unsigned NOT NULL,
  `date` date NOT NULL,
  `shift` enum('day','night') NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `set_by` int(10) unsigned DEFAULT NULL COMMENT 'HRD',
  `published_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_hr_mod_roster_property_date_shift` (`property_id`,`date`,`shift`),
  KEY `idx_hr_mod_roster_user` (`user_id`),
  KEY `fk_hr_mod_roster_set_by` (`set_by`),
  CONSTRAINT `fk_hr_mod_roster_property` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_mod_roster_set_by` FOREIGN KEY (`set_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_hr_mod_roster_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
