--
-- Host: localhost    Database: elina_db
-- ------------------------------------------------------


--
-- Table structure for table `attendance`
--

CREATE TABLE `attendance` (
  `attendance_id` bigint NOT NULL AUTO_INCREMENT,
  `attendance_emp_id` bigint NOT NULL,
  `attendance_date` date NOT NULL,
  `in_time` time DEFAULT NULL,
  `out_time` time DEFAULT NULL,
  `attendance_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remarks` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`attendance_id`),
  UNIQUE KEY `uq_attendance_emp_date` (`attendance_emp_id`,`attendance_date`),
  KEY `idx_attendance_emp_id` (`attendance_emp_id`),
  KEY `idx_attendance_date` (`attendance_emp_id`,`attendance_date`),
  KEY `idx_attendance_type` (`attendance_type`),
  CONSTRAINT `fk_attendance_emp` FOREIGN KEY (`attendance_emp_id`) REFERENCES `attendance_master_employees` (`attendance_emp_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendance`
--

INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (1,1,'2025-11-30','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-30 22:11:41');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (2,2,'2025-11-23','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (3,3,'2025-11-23','09:15:00','18:15:00','RFID',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (4,1,'2025-11-22','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (5,2,'2025-11-22','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (6,3,'2025-11-22','09:15:00','18:15:00','RFID',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (7,1,'2025-11-21','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (8,2,'2025-11-21','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (9,3,'2025-11-21','09:15:00','18:15:00','RFID',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (10,1,'2025-11-20','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (11,2,'2025-11-20','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (12,3,'2025-11-20','09:15:00','18:15:00','RFID',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (13,1,'2025-11-19','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (14,2,'2025-11-19','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (15,2,'2025-11-18','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (16,2,'2025-11-17','08:30:00','17:30:00','MOBILE',NULL,1,'2025-11-23 08:00:09');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (17,6,'2024-02-01','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-30 14:34:20');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (18,6,'2024-02-10','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-30 14:35:04');
INSERT INTO `attendance` (`attendance_id`, `attendance_emp_id`, `attendance_date`, `in_time`, `out_time`, `attendance_type`, `remarks`, `created_by`, `created_on`) VALUES (19,6,'2024-02-02','09:00:00','18:00:00','ADMIN',NULL,1,'2025-11-30 14:36:11');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_attendance_audit` AFTER INSERT ON `attendance` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    SELECT 
        ame.tenant_id,
        'ATTENDANCE',
        NEW.attendance_id,
        'INSERT',
        JSON_OBJECT(
            'attendance_id', NEW.attendance_id,
            'attendance_emp_id', NEW.attendance_emp_id,
            'attendance_date', NEW.attendance_date,
            'in_time', NEW.in_time,
            'out_time', NEW.out_time,
            'attendance_type', NEW.attendance_type
        ),
        COALESCE(NEW.created_by, 0),
        NOW()
    FROM `attendance_master_employees` ame
    WHERE ame.attendance_emp_id = NEW.attendance_emp_id;
END */;;
DELIMITER ;

--
-- Table structure for table `attendance_device_mapping`
--

CREATE TABLE `attendance_device_mapping` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `attendance_emp_id` bigint NOT NULL,
  `device_code` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `assigned_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `active_flag` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_device_code` (`device_code`),
  KEY `idx_device_mapping_emp_id` (`attendance_emp_id`),
  KEY `idx_device_mapping_device_code` (`device_code`),
  KEY `idx_device_mapping_active` (`active_flag`),
  CONSTRAINT `fk_device_mapping_emp` FOREIGN KEY (`attendance_emp_id`) REFERENCES `attendance_master_employees` (`attendance_emp_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendance_device_mapping`
--

INSERT INTO `attendance_device_mapping` (`id`, `attendance_emp_id`, `device_code`, `assigned_on`, `active_flag`) VALUES (1,1,'DEV-RFID-01','2025-11-23 08:00:09',1);
INSERT INTO `attendance_device_mapping` (`id`, `attendance_emp_id`, `device_code`, `assigned_on`, `active_flag`) VALUES (2,2,'DEV-MOB-01','2025-11-23 08:00:09',1);
INSERT INTO `attendance_device_mapping` (`id`, `attendance_emp_id`, `device_code`, `assigned_on`, `active_flag`) VALUES (3,3,'DEV-RFID-02','2025-11-23 08:00:09',1);

--
-- Table structure for table `attendance_logs`
--

CREATE TABLE `attendance_logs` (
  `log_id` bigint NOT NULL AUTO_INCREMENT,
  `attendance_emp_id` bigint NOT NULL,
  `event_time` datetime NOT NULL,
  `event_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `device_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `geo_latitude` decimal(10,7) DEFAULT NULL,
  `geo_longitude` decimal(10,7) DEFAULT NULL,
  `raw_payload` text COLLATE utf8mb4_unicode_ci,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`log_id`),
  KEY `idx_attendance_logs_emp_id` (`attendance_emp_id`),
  KEY `idx_attendance_logs_event_time` (`attendance_emp_id`,`event_time`),
  KEY `idx_attendance_logs_device` (`device_id`),
  KEY `idx_attendance_logs_event_type` (`event_type`),
  CONSTRAINT `fk_attendance_logs_emp` FOREIGN KEY (`attendance_emp_id`) REFERENCES `attendance_master_employees` (`attendance_emp_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendance_logs`
--

INSERT INTO `attendance_logs` (`log_id`, `attendance_emp_id`, `event_time`, `event_type`, `device_id`, `geo_latitude`, `geo_longitude`, `raw_payload`, `created_on`) VALUES (1,1,'2025-11-22 09:00:00','RFID_ENTRY','DEV-RFID-01',NULL,NULL,NULL,'2025-11-23 08:00:09');
INSERT INTO `attendance_logs` (`log_id`, `attendance_emp_id`, `event_time`, `event_type`, `device_id`, `geo_latitude`, `geo_longitude`, `raw_payload`, `created_on`) VALUES (2,1,'2025-11-22 18:00:00','RFID_EXIT','DEV-RFID-01',NULL,NULL,NULL,'2025-11-23 08:00:09');

--
-- Table structure for table `attendance_master_employees`
--

CREATE TABLE `attendance_master_employees` (
  `attendance_emp_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `global_emp_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobile_no` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `skill_level` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `designation` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country_code` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `employee_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'EMPLOYEE',
  `contractor_code` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate_per_day` decimal(18,2) DEFAULT NULL,
  `project_id` bigint DEFAULT NULL,
  `client_id` bigint DEFAULT NULL,
  `location_id` bigint DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`attendance_emp_id`),
  UNIQUE KEY `uq_attendance_emp_global_code` (`tenant_id`,`global_emp_code`),
  KEY `fk_attendance_emp_project` (`project_id`),
  KEY `idx_attendance_emp_tenant_id` (`tenant_id`),
  KEY `idx_attendance_emp_global_code` (`tenant_id`,`global_emp_code`),
  KEY `idx_attendance_emp_project` (`tenant_id`,`project_id`),
  KEY `idx_attendance_emp_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_attendance_emp_project` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_attendance_emp_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendance_master_employees`
--

INSERT INTO `attendance_master_employees` (`attendance_emp_id`, `tenant_id`, `global_emp_code`, `name`, `mobile_no`, `email_id`, `skill_level`, `designation`, `country_code`, `employee_type`, `contractor_code`, `rate_per_day`, `project_id`, `client_id`, `location_id`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,'EMP010','Abhayanand Siddharth','7266098685','sidd.anand2000@gmail.com','SKILLED','Enginner','+91','EMPLOYEE','',NULL,1,NULL,NULL,1,1,'2025-11-30 22:11:16',1,'2025-11-30 22:11:16');
INSERT INTO `attendance_master_employees` (`attendance_emp_id`, `tenant_id`, `global_emp_code`, `name`, `mobile_no`, `email_id`, `skill_level`, `designation`, `country_code`, `employee_type`, `contractor_code`, `rate_per_day`, `project_id`, `client_id`, `location_id`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,'EMP002','Suresh Das','9876543211',NULL,NULL,NULL,NULL,'EMPLOYEE',NULL,NULL,1,NULL,NULL,1,1,'2025-11-23 08:00:09',NULL,NULL);
INSERT INTO `attendance_master_employees` (`attendance_emp_id`, `tenant_id`, `global_emp_code`, `name`, `mobile_no`, `email_id`, `skill_level`, `designation`, `country_code`, `employee_type`, `contractor_code`, `rate_per_day`, `project_id`, `client_id`, `location_id`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,'EMP003','Amit Singh','9876543212',NULL,NULL,NULL,NULL,'EMPLOYEE',NULL,NULL,1,NULL,NULL,1,1,'2025-11-23 08:00:09',NULL,NULL);
INSERT INTO `attendance_master_employees` (`attendance_emp_id`, `tenant_id`, `global_emp_code`, `name`, `mobile_no`, `email_id`, `skill_level`, `designation`, `country_code`, `employee_type`, `contractor_code`, `rate_per_day`, `project_id`, `client_id`, `location_id`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,'EMP004','Rajesh Patel','9876543213',NULL,NULL,NULL,NULL,'EMPLOYEE',NULL,NULL,1,NULL,NULL,1,1,'2025-11-23 08:00:09',NULL,NULL);
INSERT INTO `attendance_master_employees` (`attendance_emp_id`, `tenant_id`, `global_emp_code`, `name`, `mobile_no`, `email_id`, `skill_level`, `designation`, `country_code`, `employee_type`, `contractor_code`, `rate_per_day`, `project_id`, `client_id`, `location_id`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,'EMP005','Vikram Sharma','9876543214',NULL,NULL,NULL,NULL,'EMPLOYEE',NULL,NULL,1,NULL,NULL,1,1,'2025-11-23 08:00:09',NULL,NULL);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_attendance_master_audit` AFTER INSERT ON `attendance_master_employees` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    SELECT 
        NEW.tenant_id,
        'ATTENDANCE_MASTER',
        NEW.attendance_emp_id,
        'INSERT',
        JSON_OBJECT(
            'attendance_emp_id', NEW.attendance_emp_id,
            'global_emp_code', NEW.global_emp_code,
            'name', NEW.name,
            'mobile_no', NEW.mobile_no,
            'project_id', NEW.project_id,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW();
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_attendance_master_audit_update` AFTER UPDATE ON `attendance_master_employees` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'ATTENDANCE_MASTER',
        NEW.attendance_emp_id,
        'UPDATE',
        JSON_OBJECT(
            'attendance_emp_id', OLD.attendance_emp_id,
            'global_emp_code', OLD.global_emp_code,
            'name', OLD.name,
            'mobile_no', OLD.mobile_no,
            'project_id', OLD.project_id,
            'activate_flag', OLD.activate_flag
        ),
        JSON_OBJECT(
            'attendance_emp_id', NEW.attendance_emp_id,
            'global_emp_code', NEW.global_emp_code,
            'name', NEW.name,
            'mobile_no', NEW.mobile_no,
            'project_id', NEW.project_id,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

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

CREATE TABLE `audit_logs` (
  `audit_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `table_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `record_id` bigint NOT NULL,
  `action_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `old_data` text COLLATE utf8mb4_unicode_ci,
  `new_data` text COLLATE utf8mb4_unicode_ci,
  `changed_by` bigint NOT NULL,
  `changed_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`audit_id`),
  KEY `idx_audit_logs_tenant_id` (`tenant_id`),
  KEY `idx_audit_logs_table_record` (`tenant_id`,`table_name`,`record_id`),
  KEY `idx_audit_logs_changed_on` (`tenant_id`,`changed_on`),
  KEY `idx_audit_logs_changed_by` (`tenant_id`,`changed_by`),
  CONSTRAINT `fk_audit_logs_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=30263 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (1,1,'projects',1,'INSERT',NULL,'{\"status\": \"ACTIVE\", \"end_date\": \"2024-12-31\", \"start_date\": \"2024-01-01\", \"project_code\": \"PROJ001\", \"project_name\": \"Sample Construction Project\", \"activate_flag\": 1}',1,'2025-12-01 03:10:01');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (2,1,'wbs',1,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-03-31\", \"wbs_code\": \"WBS001\", \"wbs_name\": \"Foundation Work\", \"start_date\": \"2024-01-01\", \"activate_flag\": 1}',1,'2025-12-01 03:10:01');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (3,1,'tasks',1,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-01-15\", \"task_code\": \"TASK001\", \"task_name\": \"Site Preparation\", \"start_date\": \"2024-01-01\", \"planned_qty\": 100.00, \"activate_flag\": 1}',1,'2025-12-01 03:10:01');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (4,1,'wbs',2,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-01-31\", \"wbs_code\": \"WBS009\", \"wbs_name\": \"Software Development\", \"start_date\": \"2024-01-01\", \"activate_flag\": 1}',1,'2025-12-01 03:39:31');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (5,1,'wbs',2,'INSERT',NULL,'{\"wbsCode\":\"WBS009\",\"endDate\":\"2024-01-31\",\"wbsName\":\"Software Development\",\"startDate\":\"2024-01-01\"}',1,'2025-11-30 22:09:32');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (6,1,'ATTENDANCE_MASTER',1,'INSERT',NULL,'{\"name\": \"Abhayanand Siddharth\", \"mobile_no\": \"7266098685\", \"project_id\": 1, \"activate_flag\": 1, \"global_emp_code\": \"EMP010\", \"attendance_emp_id\": 1}',1,'2025-12-01 03:41:16');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (7,1,'ATTENDANCE_MASTER',1,'INSERT',NULL,'{\"countryCode\":\"+91\",\"globalEmpCode\":\"EMP010\",\"name\":\"Abhayanand Siddharth\",\"ratePerDay\":null,\"emailId\":\"sidd.anand2000@gmail.com\",\"mobileNo\":\"7266098685\",\"designation\":\"Enginner\",\"skillLevel\":\"SKILLED\",\"projectId\":1}',1,'2025-11-30 22:11:16');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (8,1,'ATTENDANCE',1,'INSERT',NULL,'{\"in_time\": \"09:00:00.000000\", \"out_time\": \"18:00:00.000000\", \"attendance_id\": 1, \"attendance_date\": \"2025-11-30\", \"attendance_type\": \"ADMIN\", \"attendance_emp_id\": 1}',1,'2025-12-01 03:41:41');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (9,1,'ATTENDANCE',1,'INSERT',NULL,'{\"inTime\":\"09:00\",\"attendanceType\":\"ADMIN\",\"attendanceEmpId\":1,\"attendanceDate\":\"2025-11-30\",\"outTime\":\"18:00\"}',1,'2025-11-30 22:11:41');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10,1,'projects',2,'INSERT',NULL,'{\"status\": \"ACTIVE\", \"end_date\": \"2024-11-30\", \"start_date\": \"2024-02-01\", \"project_code\": \"PROJ002\", \"project_name\": \"Software Development Project\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (11,1,'projects',3,'INSERT',NULL,'{\"status\": \"INACTIVE\", \"end_date\": \"2025-12-21\", \"start_date\": \"2025-11-21\", \"project_code\": \"TESTPRJ010\", \"project_name\": \"test project836u nv 4n5in5nv 45 y fynu5yng4ngn gy 4nyg g4nybyb 4y nyb bb4iyniyio57j b   iun536inib 6 3iniuni653i \", \"activate_flag\": 0}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (12,1,'projects',4,'INSERT',NULL,'{\"status\": \"INACTIVE\", \"end_date\": null, \"start_date\": null, \"project_code\": \"PROJECT 3040 UUYEQBEW132 VUQVEFUYB24 4Q4GRG3GT \", \"project_name\": \"634784\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (13,1,'projects',5,'INSERT',NULL,'{\"status\": \"ACTIVE\", \"end_date\": \"2025-11-30\", \"start_date\": \"2025-11-01\", \"project_code\": \"PROJ0002\", \"project_name\": \"Checking resource allocation\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (14,1,'projects',6,'INSERT',NULL,'{\"status\": \"ACTIVE\", \"end_date\": \"2025-11-30\", \"start_date\": \"2025-11-01\", \"project_code\": \"TESTPROJ001\", \"project_name\": \"Testing completion - 26/11\", \"activate_flag\": 0}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (15,1,'projects',10006,'INSERT',NULL,'{\"status\": \"ACTIVE\", \"end_date\": \"2025-11-19\", \"start_date\": \"2025-11-05\", \"project_code\": \"3643HFCHDH\", \"project_name\": \"234567\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (16,1,'wbs',3,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-08-31\", \"wbs_code\": \"WBS003\", \"wbs_name\": \"Development Phase\", \"start_date\": \"2024-02-01\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (17,1,'wbs',4,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": null, \"wbs_code\": \"TEST_WBS \", \"wbs_name\": \"project_delete\", \"start_date\": null, \"activate_flag\": 0}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (18,1,'wbs',5,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": null, \"wbs_code\": \"WBS006\", \"wbs_name\": \"test wbs\", \"start_date\": null, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (19,1,'wbs',6,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": null, \"wbs_code\": \"WBS0061\", \"wbs_name\": \"jr test wbs\", \"start_date\": null, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20,1,'wbs',7,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": null, \"wbs_code\": \"WBS0062\", \"wbs_name\": \"child testing\", \"start_date\": null, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (21,1,'wbs',8,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-08\", \"wbs_code\": \"WBS00023\", \"wbs_name\": \"checking resource\", \"start_date\": \"2025-11-01\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (22,1,'wbs',9,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-26\", \"wbs_code\": \"TESTWBS001\", \"wbs_name\": \"Test WBS - 24/11\", \"start_date\": \"2025-11-24\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (23,1,'wbs',10,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-30\", \"wbs_code\": \"WBS_LOCKING001\", \"wbs_name\": \"Testing_Lock_WBS\", \"start_date\": \"2025-11-24\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (24,1,'wbs',10009,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-19\", \"wbs_code\": \"2345678\", \"wbs_name\": \"234567\", \"start_date\": \"2025-11-05\", \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (25,1,'tasks',2,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-02-28\", \"task_code\": \"TASK002\", \"task_name\": \"Excavation Work\", \"start_date\": \"2024-01-16\", \"planned_qty\": 400.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (26,1,'tasks',3,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-05-31\", \"task_code\": \"TASK003\", \"task_name\": \"Backend Development\", \"start_date\": \"2024-02-01\", \"planned_qty\": 1200.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (27,1,'tasks',4,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2024-08-31\", \"task_code\": \"TASK004\", \"task_name\": \"Frontend Development\", \"start_date\": \"2024-03-01\", \"planned_qty\": 800.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (28,1,'tasks',5,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-14\", \"task_code\": \"TASK_EXCAVATION_A\", \"task_name\": \"Excavation Zone A / Trench Digging\", \"start_date\": \"2025-11-05\", \"planned_qty\": 100.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (29,1,'tasks',6,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-24\", \"task_code\": \"TESTTASK0001\", \"task_name\": \"Checking manpower & resource allocation\", \"start_date\": \"2025-11-22\", \"planned_qty\": 52.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30,1,'tasks',7,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-05\", \"task_code\": \"TASK0003\", \"task_name\": \"checking resource allocation\", \"start_date\": \"2025-11-01\", \"planned_qty\": 100.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (31,1,'tasks',8,'INSERT',NULL,'{\"status\": \"PLANNED\", \"end_date\": \"2025-11-30\", \"task_code\": \"TESTLOCKING\", \"task_name\": \"Testing locking functionalities\", \"start_date\": \"2025-11-24\", \"planned_qty\": 100.00, \"activate_flag\": 1}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (32,1,'task_updates',1,'INSERT',NULL,'{\"task_id\": 6, \"actual_qty\": 12.00, \"update_date\": \"2025-11-22\", \"daily_update_qty\": 12.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (33,1,'task_updates',2,'INSERT',NULL,'{\"task_id\": 7, \"actual_qty\": 10.00, \"update_date\": \"2025-11-01\", \"daily_update_qty\": 0.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (34,1,'task_updates',3,'INSERT',NULL,'{\"task_id\": 7, \"actual_qty\": 10.00, \"update_date\": \"2025-11-02\", \"daily_update_qty\": 0.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (35,1,'task_updates',4,'INSERT',NULL,'{\"task_id\": 7, \"actual_qty\": 10.00, \"update_date\": \"2025-11-03\", \"daily_update_qty\": 0.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (36,1,'task_updates',5,'INSERT',NULL,'{\"task_id\": 7, \"actual_qty\": 11.00, \"update_date\": \"2025-11-04\", \"daily_update_qty\": 0.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (37,1,'task_updates',6,'INSERT',NULL,'{\"task_id\": 7, \"actual_qty\": 20.00, \"update_date\": \"2025-11-05\", \"daily_update_qty\": 20.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (38,1,'task_updates',7,'INSERT',NULL,'{\"task_id\": 8, \"actual_qty\": 50.00, \"update_date\": \"2025-11-24\", \"daily_update_qty\": 0.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (39,1,'task_updates',10007,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-01\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (40,1,'task_updates',10008,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-02\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (41,1,'task_updates',10009,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-03\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (42,1,'task_updates',10010,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-04\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (43,1,'task_updates',10011,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-05\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (44,1,'task_updates',10012,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-06\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (45,1,'task_updates',10013,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-07\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (46,1,'task_updates',10014,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-08\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (47,1,'task_updates',10015,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-09\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (48,1,'task_updates',10016,'INSERT',NULL,'{\"task_id\": 3, \"actual_qty\": 9.00, \"update_date\": \"2024-02-10\", \"daily_update_qty\": 9.00}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (49,1,'confirmations',1,'INSERT',NULL,'{\"entity_id\": 1, \"entity_type\": \"WBS\", \"confirmed_by\": 1, \"confirmation_date\": \"2025-11-10\"}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (50,1,'confirmations',2,'INSERT',NULL,'{\"entity_id\": 3, \"entity_type\": \"WBS\", \"confirmed_by\": 1, \"confirmation_date\": \"2024-02-01\"}',1,'2025-12-01 03:53:25');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (51,1,'MANPOWER_ALLOCATIONS',1,'INSERT',NULL,'{\"wbs_id\": 1, \"end_date\": \"2025-11-21\", \"start_date\": \"2025-11-12\", \"total_cost\": 8000.00, \"employee_id\": 1, \"allocation_id\": 1, \"hours_assigned\": 8.00}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (52,1,'MANPOWER_ALLOCATIONS',2,'INSERT',NULL,'{\"wbs_id\": 3, \"end_date\": \"2024-02-06\", \"start_date\": \"2024-02-02\", \"total_cost\": 4100.00, \"employee_id\": 4, \"allocation_id\": 2, \"hours_assigned\": 8.00}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (53,1,'MANPOWER_ALLOCATIONS',3,'INSERT',NULL,'{\"wbs_id\": 3, \"end_date\": \"2024-02-29\", \"start_date\": \"2024-02-13\", \"total_cost\": 8500.00, \"employee_id\": 10, \"allocation_id\": 3, \"hours_assigned\": 8.00}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (54,1,'EQUIPMENT_ALLOCATIONS',1,'INSERT',NULL,'{\"wbs_id\": 1, \"end_date\": \"2025-11-26\", \"start_date\": \"2025-11-22\", \"total_cost\": 17500.00, \"equipment_id\": 1, \"allocation_id\": 1, \"hours_assigned\": 10.00}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (55,1,'MATERIAL_USAGE',1,'INSERT',NULL,'{\"wbs_id\": 1, \"remarks\": \"Seeded cement usage for WBS\", \"qty_used\": 120.00, \"usage_date\": \"2025-11-07\", \"material_type\": \"Cement\"}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (56,1,'MATERIAL_USAGE',2,'INSERT',NULL,'{\"wbs_id\": 1, \"remarks\": \"Seeded steel usage for WBS\", \"qty_used\": 450.00, \"usage_date\": \"2025-11-08\", \"material_type\": \"Steel\"}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (57,1,'MATERIAL_USAGE',3,'INSERT',NULL,'{\"wbs_id\": 1, \"remarks\": \"Seeded sand usage for WBS\", \"qty_used\": 3.50, \"usage_date\": \"2025-11-09\", \"material_type\": \"Sand\"}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (58,1,'MATERIAL_USAGE',4,'INSERT',NULL,'{\"wbs_id\": 8, \"remarks\": null, \"qty_used\": 2.00, \"usage_date\": \"2025-11-01\", \"material_type\": \"Cement\"}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (59,1,'MATERIAL_USAGE',5,'INSERT',NULL,'{\"wbs_id\": 8, \"remarks\": null, \"qty_used\": 20.00, \"usage_date\": \"2025-11-01\", \"material_type\": \"Steel\"}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (60,1,'ATTENDANCE_MASTER',2,'INSERT',NULL,'{\"name\": \"Suresh Das\", \"mobile_no\": \"9876543211\", \"project_id\": 1, \"activate_flag\": 1, \"global_emp_code\": \"EMP002\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (61,1,'ATTENDANCE_MASTER',3,'INSERT',NULL,'{\"name\": \"Amit Singh\", \"mobile_no\": \"9876543212\", \"project_id\": 1, \"activate_flag\": 1, \"global_emp_code\": \"EMP003\", \"attendance_emp_id\": 3}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (62,1,'ATTENDANCE_MASTER',4,'INSERT',NULL,'{\"name\": \"Rajesh Patel\", \"mobile_no\": \"9876543213\", \"project_id\": 1, \"activate_flag\": 1, \"global_emp_code\": \"EMP004\", \"attendance_emp_id\": 4}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (63,1,'ATTENDANCE_MASTER',5,'INSERT',NULL,'{\"name\": \"Vikram Sharma\", \"mobile_no\": \"9876543214\", \"project_id\": 1, \"activate_flag\": 1, \"global_emp_code\": \"EMP005\", \"attendance_emp_id\": 5}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (64,1,'ATTENDANCE',2,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 2, \"attendance_date\": \"2025-11-23\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (65,1,'ATTENDANCE',3,'INSERT',NULL,'{\"in_time\": \"09:15:00.000000\", \"out_time\": \"18:15:00.000000\", \"attendance_id\": 3, \"attendance_date\": \"2025-11-23\", \"attendance_type\": \"RFID\", \"attendance_emp_id\": 3}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (66,1,'ATTENDANCE',4,'INSERT',NULL,'{\"in_time\": \"09:00:00.000000\", \"out_time\": \"18:00:00.000000\", \"attendance_id\": 4, \"attendance_date\": \"2025-11-22\", \"attendance_type\": \"ADMIN\", \"attendance_emp_id\": 1}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (67,1,'ATTENDANCE',5,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 5, \"attendance_date\": \"2025-11-22\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (68,1,'ATTENDANCE',6,'INSERT',NULL,'{\"in_time\": \"09:15:00.000000\", \"out_time\": \"18:15:00.000000\", \"attendance_id\": 6, \"attendance_date\": \"2025-11-22\", \"attendance_type\": \"RFID\", \"attendance_emp_id\": 3}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (69,1,'ATTENDANCE',7,'INSERT',NULL,'{\"in_time\": \"09:00:00.000000\", \"out_time\": \"18:00:00.000000\", \"attendance_id\": 7, \"attendance_date\": \"2025-11-21\", \"attendance_type\": \"ADMIN\", \"attendance_emp_id\": 1}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (70,1,'ATTENDANCE',8,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 8, \"attendance_date\": \"2025-11-21\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (71,1,'ATTENDANCE',9,'INSERT',NULL,'{\"in_time\": \"09:15:00.000000\", \"out_time\": \"18:15:00.000000\", \"attendance_id\": 9, \"attendance_date\": \"2025-11-21\", \"attendance_type\": \"RFID\", \"attendance_emp_id\": 3}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (72,1,'ATTENDANCE',10,'INSERT',NULL,'{\"in_time\": \"09:00:00.000000\", \"out_time\": \"18:00:00.000000\", \"attendance_id\": 10, \"attendance_date\": \"2025-11-20\", \"attendance_type\": \"ADMIN\", \"attendance_emp_id\": 1}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (73,1,'ATTENDANCE',11,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 11, \"attendance_date\": \"2025-11-20\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (74,1,'ATTENDANCE',12,'INSERT',NULL,'{\"in_time\": \"09:15:00.000000\", \"out_time\": \"18:15:00.000000\", \"attendance_id\": 12, \"attendance_date\": \"2025-11-20\", \"attendance_type\": \"RFID\", \"attendance_emp_id\": 3}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (75,1,'ATTENDANCE',13,'INSERT',NULL,'{\"in_time\": \"09:00:00.000000\", \"out_time\": \"18:00:00.000000\", \"attendance_id\": 13, \"attendance_date\": \"2025-11-19\", \"attendance_type\": \"ADMIN\", \"attendance_emp_id\": 1}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (76,1,'ATTENDANCE',14,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 14, \"attendance_date\": \"2025-11-19\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (77,1,'ATTENDANCE',15,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 15, \"attendance_date\": \"2025-11-18\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (78,1,'ATTENDANCE',16,'INSERT',NULL,'{\"in_time\": \"08:30:00.000000\", \"out_time\": \"17:30:00.000000\", \"attendance_id\": 16, \"attendance_date\": \"2025-11-17\", \"attendance_type\": \"MOBILE\", \"attendance_emp_id\": 2}',1,'2025-12-01 03:53:26');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (79,1,'wbs',6,'INSERT',NULL,'[{\"wbs_code\":\"WBS0061\",\"wbs_name\":\"jr test wbs\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-21 12:55:03');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (80,1,'wbs',6,'INSERT',NULL,'{\"wbsCode\":\"WBS0061\",\"endDate\":null,\"wbsName\":\"jr test wbs\",\"startDate\":null}',1,'2025-11-21 12:55:03');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (81,1,'wbs',7,'INSERT',NULL,'[{\"wbs_code\":\"WBS0062\",\"wbs_name\":\"child testing\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-21 12:57:01');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (82,1,'wbs',7,'INSERT',NULL,'{\"wbsCode\":\"WBS0062\",\"endDate\":null,\"wbsName\":\"child testing\",\"startDate\":null}',1,'2025-11-21 12:57:01');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (83,1,'MANPOWER_ALLOCATIONS',1,'INSERT',NULL,'{\"allocation_id\":1,\"wbs_id\":1,\"employee_id\":1,\"start_date\":\"2025-11-12\",\"end_date\":\"2025-11-21\",\"hours_assigned\":8.00,\"duration_days\":10,\"total_cost\":8000.00,\"remarks\":\"10-day masonry package\"}',1,'2025-11-21 19:47:41');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (84,1,'EQUIPMENT_ALLOCATIONS',1,'INSERT',NULL,'{\"allocation_id\":1,\"wbs_id\":1,\"equipment_id\":1,\"start_date\":\"2025-11-22\",\"end_date\":\"2025-11-26\",\"hours_assigned\":10.00,\"duration_days\":5,\"total_cost\":17500.00,\"remarks\":\"Excavation support for WBS 2.1\"}',1,'2025-11-21 19:47:41');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (85,1,'CONFIRMATIONS',1,'INSERT',NULL,'[{\"entity_type\":\"WBS\",\"entity_id\":1,\"confirmation_date\":\"2025-11-10\",\"confirmed_by\":1,\"confirmed_on\":\"2025-11-22T05:57:27.2127569\",\"remarks\":\"Seeded freeze for Site Mobilisation\"}]',1,'2025-11-22 05:57:27');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (86,1,'CONFIRMATION_LOCKS',1,'INSERT',NULL,'[{\"lock_date\":\"2025-11-10\"}]',1,'2025-11-22 05:57:27');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (87,1,'tasks',6,'INSERT',NULL,'[{\"task_code\":\"TESTTASK0001\",\"task_name\":\"Checking manpower & resource allocation\",\"start_date\":\"2025-11-22\",\"end_date\":\"2025-11-24\",\"planned_qty\":52.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 11:41:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (88,1,'tasks',6,'INSERT',NULL,'{\"taskCode\":\"TESTTASK0001\",\"endDate\":\"2025-11-24\",\"taskName\":\"Checking manpower & resource allocation\",\"startDate\":\"2025-11-22\"}',1,'2025-11-22 11:41:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (89,1,'PLAN_VERSION',3,'INSERT',NULL,'[{\"task_id\":6,\"version_no\":1,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-22 11:42:05');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (90,1,'PLAN_LINES',21,'INSERT',NULL,'[{\"plan_version_id\":3,\"task_id\":6,\"line_number\":1,\"work_date\":\"2025-11-22\",\"planned_qty\":25.00,\"activate_flag\":true}]',0,'2025-11-22 11:42:06');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (91,1,'PLAN_VERSION',3,'INSERT',NULL,'{\"versionNo\":1,\"versionDate\":\"2025-11-22\",\"lineCount\":1}',1,'2025-11-22 11:42:06');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (92,1,'PLAN_VERSION',4,'INSERT',NULL,'[{\"task_id\":6,\"version_no\":2,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-22 11:43:51');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (93,1,'PLAN_LINES',22,'INSERT',NULL,'[{\"plan_version_id\":4,\"task_id\":6,\"line_number\":1,\"work_date\":\"2025-11-22\",\"planned_qty\":25.00,\"activate_flag\":true}]',0,'2025-11-22 11:43:51');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (94,1,'PLAN_VERSION',4,'INSERT',NULL,'{\"versionNo\":2,\"versionDate\":\"2025-11-22\",\"lineCount\":1}',1,'2025-11-22 11:43:51');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (95,1,'PLAN_VERSION',3,'UPDATE','[{\"task_id\":6,\"version_no\":1,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]','[{\"task_id\":6,\"version_no\":1,\"version_date\":\"2025-11-22\",\"is_active\":false,\"activate_flag\":true}]',0,'2025-11-22 11:43:51');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (96,1,'TASK_UPDATES',1,'INSERT',NULL,'[{\"update_date\":\"2025-11-22\",\"planned_qty\":25.00,\"actual_qty\":12.00,\"daily_update_qty\":12.00,\"activate_flag\":true}]',1,'2025-11-22 11:46:38');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (97,1,'task_updates',1,'INSERT',NULL,'{\"updateDate\":\"2025-11-22\",\"actualQty\":12,\"dailyUpdateQty\":12}',1,'2025-11-22 11:46:38');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (98,1,'tasks',6,'UPDATE','[{\"task_code\":\"TESTTASK0001\",\"task_name\":\"Checking manpower & resource allocation\",\"start_date\":\"2025-11-22\",\"end_date\":\"2025-11-24\",\"planned_qty\":52.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TESTTASK0001\",\"task_name\":\"Checking manpower & resource allocation\",\"start_date\":\"2025-11-22\",\"end_date\":\"2025-11-24\",\"planned_qty\":52.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 11:46:38');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (99,1,'projects',5,'INSERT',NULL,'[{\"project_code\":\"PROJ0002\",\"project_name\":\"Checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-22 11:49:40');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (100,1,'projects',5,'INSERT',NULL,'{\"projectCode\":\"PROJ0002\",\"endDate\":\"2025-11-30\",\"projectName\":\"Checking resource allocation\",\"startDate\":\"2025-11-01\"}',1,'2025-11-22 11:49:40');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (101,1,'wbs',8,'INSERT',NULL,'[{\"wbs_code\":\"WBS00023\",\"wbs_name\":\"checking resource\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-08\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 11:50:16');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (102,1,'wbs',8,'INSERT',NULL,'{\"wbsCode\":\"WBS00023\",\"endDate\":\"2025-11-08\",\"wbsName\":\"checking resource\",\"startDate\":\"2025-11-01\"}',1,'2025-11-22 11:50:16');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (103,1,'tasks',7,'INSERT',NULL,'[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 11:51:06');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (104,1,'tasks',7,'INSERT',NULL,'{\"taskCode\":\"TASK0003\",\"endDate\":\"2025-11-05\",\"taskName\":\"checking resource allocation\",\"startDate\":\"2025-11-01\"}',1,'2025-11-22 11:51:06');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (105,1,'PLAN_VERSION',5,'INSERT',NULL,'[{\"task_id\":7,\"version_no\":1,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-22 11:53:14');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (106,1,'PLAN_LINES',23,'INSERT',NULL,'[{\"plan_version_id\":5,\"task_id\":7,\"line_number\":1,\"work_date\":\"2025-11-01\",\"planned_qty\":50.00,\"activate_flag\":true}]',0,'2025-11-22 11:53:14');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (107,1,'PLAN_VERSION',5,'INSERT',NULL,'{\"versionNo\":1,\"versionDate\":\"2025-11-22\",\"lineCount\":1}',1,'2025-11-22 11:53:14');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (108,1,'TASK_UPDATES',2,'INSERT',NULL,'[{\"update_date\":\"2025-11-01\",\"planned_qty\":50.00,\"actual_qty\":10.00,\"daily_update_qty\":10.00,\"activate_flag\":true}]',1,'2025-11-22 11:55:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (109,1,'task_updates',2,'INSERT',NULL,'{\"updateDate\":\"2025-11-01\",\"actualQty\":10,\"dailyUpdateQty\":10}',1,'2025-11-22 11:55:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (110,1,'tasks',7,'UPDATE','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 11:55:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (111,1,'projects',4,'UPDATE','{\"projectCode\":\"PROJECT 3040 UUYEQBEW132 VUQVEFUYB24 4Q4GRG3GT \",\"endDate\":null,\"projectName\":\"634784\",\"startDate\":null,\"status\":\"ACTIVE\"}','{\"projectCode\":\"PROJECT 3040 UUYEQBEW132 VUQVEFUYB24 4Q4GRG3GT \",\"endDate\":null,\"projectName\":\"634784\",\"startDate\":null,\"status\":\"INACTIVE\"}',1,'2025-11-22 11:58:37');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (112,1,'projects',4,'UPDATE','[{\"project_code\":\"PROJECT 3040 UUYEQBEW132 VUQVEFUYB24 4Q4GRG3GT \",\"project_name\":\"634784\",\"status\":\"ACTIVE\",\"activate_flag\":true}]','[{\"project_code\":\"PROJECT 3040 UUYEQBEW132 VUQVEFUYB24 4Q4GRG3GT \",\"project_name\":\"634784\",\"status\":\"INACTIVE\",\"activate_flag\":true}]',0,'2025-11-22 11:58:37');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (113,1,'projects',3,'UPDATE','{\"projectCode\":\"TESTPRJ010\",\"endDate\":\"2025-12-21\",\"projectName\":\"test project836u nv 4n5in5nv 45 y fynu5yng4ngn gy 4nyg g4nybyb 4y nyb bb4iyniyio57j b   iun536inib 6 3iniuni653i \",\"startDate\":\"2025-11-21\",\"status\":\"ACTIVE\"}','{\"projectCode\":\"TESTPRJ010\",\"endDate\":\"2025-12-21\",\"projectName\":\"test project836u nv 4n5in5nv 45 y fynu5yng4ngn gy 4nyg g4nybyb 4y nyb bb4iyniyio57j b   iun536inib 6 3iniuni653i \",\"startDate\":\"2025-11-21\",\"status\":\"INACTIVE\"}',1,'2025-11-22 11:58:44');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (114,1,'projects',3,'UPDATE','[{\"project_code\":\"TESTPRJ010\",\"project_name\":\"test project836u nv 4n5in5nv 45 y fynu5yng4ngn gy 4nyg g4nybyb 4y nyb bb4iyniyio57j b   iun536inib 6 3iniuni653i \",\"start_date\":\"2025-11-21\",\"end_date\":\"2025-12-21\",\"status\":\"ACTIVE\",\"activate_flag\":false}]','[{\"project_code\":\"TESTPRJ010\",\"project_name\":\"test project836u nv 4n5in5nv 45 y fynu5yng4ngn gy 4nyg g4nybyb 4y nyb bb4iyniyio57j b   iun536inib 6 3iniuni653i \",\"start_date\":\"2025-11-21\",\"end_date\":\"2025-12-21\",\"status\":\"INACTIVE\",\"activate_flag\":false}]',0,'2025-11-22 11:58:44');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (115,1,'PLAN_VERSION',6,'INSERT',NULL,'[{\"task_id\":7,\"version_no\":2,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (116,1,'PLAN_LINES',24,'INSERT',NULL,'[{\"plan_version_id\":6,\"task_id\":7,\"line_number\":1,\"work_date\":\"2025-11-02\",\"planned_qty\":15.00,\"activate_flag\":true}]',0,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (117,1,'PLAN_LINES',25,'INSERT',NULL,'[{\"plan_version_id\":6,\"task_id\":7,\"line_number\":2,\"work_date\":\"2025-11-03\",\"planned_qty\":15.00,\"activate_flag\":true}]',0,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (118,1,'PLAN_LINES',26,'INSERT',NULL,'[{\"plan_version_id\":6,\"task_id\":7,\"line_number\":3,\"work_date\":\"2025-11-04\",\"planned_qty\":15.00,\"activate_flag\":true}]',0,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (119,1,'PLAN_LINES',27,'INSERT',NULL,'[{\"plan_version_id\":6,\"task_id\":7,\"line_number\":4,\"work_date\":\"2025-11-05\",\"planned_qty\":15.00,\"activate_flag\":true}]',0,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (120,1,'PLAN_VERSION',6,'INSERT',NULL,'{\"versionNo\":2,\"versionDate\":\"2025-11-22\",\"lineCount\":4}',1,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (121,1,'PLAN_VERSION',5,'UPDATE','[{\"task_id\":7,\"version_no\":1,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]','[{\"task_id\":7,\"version_no\":1,\"version_date\":\"2025-11-22\",\"is_active\":false,\"activate_flag\":true}]',0,'2025-11-22 12:48:42');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (122,1,'PLAN_VERSION',7,'INSERT',NULL,'[{\"task_id\":7,\"version_no\":3,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (123,1,'PLAN_LINES',28,'INSERT',NULL,'[{\"plan_version_id\":7,\"task_id\":7,\"line_number\":1,\"work_date\":\"2025-11-01\",\"planned_qty\":20.00,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (124,1,'PLAN_LINES',29,'INSERT',NULL,'[{\"plan_version_id\":7,\"task_id\":7,\"line_number\":2,\"work_date\":\"2025-11-02\",\"planned_qty\":20.00,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (125,1,'PLAN_LINES',30,'INSERT',NULL,'[{\"plan_version_id\":7,\"task_id\":7,\"line_number\":3,\"work_date\":\"2025-11-03\",\"planned_qty\":20.00,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (126,1,'PLAN_LINES',31,'INSERT',NULL,'[{\"plan_version_id\":7,\"task_id\":7,\"line_number\":4,\"work_date\":\"2025-11-04\",\"planned_qty\":20.00,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (127,1,'PLAN_LINES',32,'INSERT',NULL,'[{\"plan_version_id\":7,\"task_id\":7,\"line_number\":5,\"work_date\":\"2025-11-05\",\"planned_qty\":20.00,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (128,1,'PLAN_VERSION',7,'INSERT',NULL,'{\"versionNo\":3,\"versionDate\":\"2025-11-22\",\"lineCount\":5}',1,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (129,1,'PLAN_VERSION',6,'UPDATE','[{\"task_id\":7,\"version_no\":2,\"version_date\":\"2025-11-22\",\"is_active\":true,\"activate_flag\":true}]','[{\"task_id\":7,\"version_no\":2,\"version_date\":\"2025-11-22\",\"is_active\":false,\"activate_flag\":true}]',0,'2025-11-22 12:49:58');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (130,1,'task_updates',2,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-01\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 12:50:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (131,1,'TASK_UPDATES',2,'UPDATE','[{\"update_date\":\"2025-11-01\",\"planned_qty\":50.00,\"actual_qty\":10.00,\"daily_update_qty\":10.00,\"activate_flag\":true}]','[{\"update_date\":\"2025-11-01\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":0.00,\"activate_flag\":true}]',1,'2025-11-22 12:50:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (132,1,'TASK_UPDATES',3,'INSERT',NULL,'[{\"update_date\":\"2025-11-02\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":10.00,\"activate_flag\":true}]',1,'2025-11-22 12:50:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (133,1,'task_updates',3,'INSERT',NULL,'{\"updateDate\":\"2025-11-02\",\"actualQty\":10,\"dailyUpdateQty\":10}',1,'2025-11-22 12:50:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (134,1,'tasks',7,'UPDATE','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 12:50:15');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (141,1,'task_updates',2,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-01\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 12:51:13');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (142,1,'task_updates',3,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-02\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 12:51:13');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (143,1,'TASK_UPDATES',3,'UPDATE','[{\"update_date\":\"2025-11-02\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":10.00,\"activate_flag\":true}]','[{\"update_date\":\"2025-11-02\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":0.00,\"activate_flag\":true}]',1,'2025-11-22 12:51:13');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (144,1,'TASK_UPDATES',4,'INSERT',NULL,'[{\"update_date\":\"2025-11-03\",\"planned_qty\":20.00,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-22 12:51:13');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (145,1,'task_updates',4,'INSERT',NULL,'{\"updateDate\":\"2025-11-03\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-22 12:51:13');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (146,1,'tasks',7,'UPDATE','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 12:51:13');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (147,1,'task_updates',2,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-01\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 12:53:17');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (148,1,'task_updates',3,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-02\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 12:53:17');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (149,1,'task_updates',4,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-03\",\"actualQty\":10,\"dailyUpdateQty\":1.00}',1,'2025-11-22 12:53:17');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (150,1,'TASK_UPDATES',4,'UPDATE','[{\"update_date\":\"2025-11-03\",\"planned_qty\":20.00,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]','[{\"update_date\":\"2025-11-03\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":1.00,\"activate_flag\":true}]',1,'2025-11-22 12:53:17');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (151,1,'tasks',7,'UPDATE','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 12:53:17');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (160,1,'task_updates',2,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-01\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (161,1,'task_updates',3,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-02\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (162,1,'task_updates',4,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-03\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (163,1,'TASK_UPDATES',4,'UPDATE','[{\"update_date\":\"2025-11-03\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":1.00,\"activate_flag\":true}]','[{\"update_date\":\"2025-11-03\",\"planned_qty\":20.00,\"actual_qty\":10.00,\"daily_update_qty\":0.00,\"activate_flag\":true}]',1,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (164,1,'TASK_UPDATES',5,'INSERT',NULL,'[{\"update_date\":\"2025-11-04\",\"planned_qty\":20.00,\"actual_qty\":11.00,\"daily_update_qty\":11.00,\"activate_flag\":true}]',1,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (165,1,'task_updates',5,'INSERT',NULL,'{\"updateDate\":\"2025-11-04\",\"actualQty\":11,\"dailyUpdateQty\":11}',1,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (166,1,'tasks',7,'UPDATE','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 13:29:39');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (167,1,'task_updates',2,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-01\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:52');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (168,1,'task_updates',3,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-02\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:52');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (169,1,'task_updates',4,'UPDATE','{\"actualQty\":10}','{\"updateDate\":\"2025-11-03\",\"actualQty\":10,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:52');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (170,1,'task_updates',5,'UPDATE','{\"actualQty\":11}','{\"updateDate\":\"2025-11-04\",\"actualQty\":11,\"dailyUpdateQty\":0.00}',1,'2025-11-22 13:29:52');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (171,1,'TASK_UPDATES',5,'UPDATE','[{\"update_date\":\"2025-11-04\",\"planned_qty\":20.00,\"actual_qty\":11.00,\"daily_update_qty\":11.00,\"activate_flag\":true}]','[{\"update_date\":\"2025-11-04\",\"planned_qty\":20.00,\"actual_qty\":11.00,\"daily_update_qty\":0.00,\"activate_flag\":true}]',1,'2025-11-22 13:29:52');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (172,1,'TASK_UPDATES',6,'INSERT',NULL,'[{\"update_date\":\"2025-11-05\",\"planned_qty\":20.00,\"actual_qty\":20.00,\"daily_update_qty\":20.00,\"activate_flag\":true}]',1,'2025-11-22 13:29:52');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (173,1,'task_updates',6,'INSERT',NULL,'{\"updateDate\":\"2025-11-05\",\"actualQty\":20,\"dailyUpdateQty\":20}',1,'2025-11-22 13:29:53');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (174,1,'tasks',7,'UPDATE','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK0003\",\"task_name\":\"checking resource allocation\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-05\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-22 13:29:53');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (175,1,'MATERIAL_USAGE',1,'INSERT',NULL,'{\"wbs_id\":1,\"material_type\":\"Cement\",\"qty_used\":120.00,\"usage_date\":\"2025-11-07\",\"remarks\":\"Seeded cement usage for WBS\"}',1,'2025-11-23 06:47:18');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (176,1,'MATERIAL_USAGE',2,'INSERT',NULL,'{\"wbs_id\":1,\"material_type\":\"Steel\",\"qty_used\":450.00,\"usage_date\":\"2025-11-08\",\"remarks\":\"Seeded steel usage for WBS\"}',1,'2025-11-23 06:47:18');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (177,1,'MATERIAL_USAGE',3,'INSERT',NULL,'{\"wbs_id\":1,\"material_type\":\"Sand\",\"qty_used\":3.50,\"usage_date\":\"2025-11-09\",\"remarks\":\"Seeded sand usage for WBS\"}',1,'2025-11-23 06:47:18');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (178,1,'MATERIAL_USAGE',4,'INSERT',NULL,'{\"wbs_id\":8,\"material_type\":\"Cement\",\"qty_used\":2.00,\"usage_date\":\"2025-11-01\"}',1,'2025-11-23 07:11:49');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (179,1,'material_usage',4,'INSERT',NULL,'{\"qtyUsed\":2,\"usageDate\":\"2025-11-01\",\"materialType\":\"Cement\",\"wbsId\":8,\"remarks\":null}',1,'2025-11-23 12:41:50');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (180,1,'MATERIAL_USAGE',5,'INSERT',NULL,'{\"wbs_id\":8,\"material_type\":\"Steel\",\"qty_used\":20.00,\"usage_date\":\"2025-11-01\"}',1,'2025-11-23 07:12:23');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (181,1,'material_usage',5,'INSERT',NULL,'{\"qtyUsed\":20,\"usageDate\":\"2025-11-01\",\"materialType\":\"Steel\",\"wbsId\":8,\"remarks\":null}',1,'2025-11-23 12:42:23');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (182,1,'MATERIAL_USAGE',6,'INSERT',NULL,'{\"wbs_id\":8,\"material_type\":\"Bricks\",\"qty_used\":4000.00,\"usage_date\":\"2025-11-01\"}',1,'2025-11-23 07:12:55');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (183,1,'material_usage',6,'INSERT',NULL,'{\"qtyUsed\":4000,\"usageDate\":\"2025-11-01\",\"materialType\":\"Bricks\",\"wbsId\":8,\"remarks\":null}',1,'2025-11-23 12:42:55');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (184,1,'material_usage',6,'UPDATE','{\"qtyUsed\":4000,\"usageDate\":\"2025-11-01\",\"materialType\":\"Bricks\",\"remarks\":null}','{\"qtyUsed\":4000,\"usageDate\":\"2025-11-01\",\"materialType\":\"Bricks\",\"wbsId\":8,\"remarks\":null}',1,'2025-11-23 12:43:02');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (185,1,'material_usage',6,'DELETE','{\"qtyUsed\":4000.00,\"usageDate\":\"2025-11-01\",\"materialType\":\"Bricks\",\"wbsId\":8,\"remarks\":null}',NULL,1,'2025-11-23 12:43:24');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (186,1,'MATERIAL_USAGE',6,'DELETE','{\"wbs_id\":8,\"material_type\":\"Bricks\",\"qty_used\":4000.00,\"usage_date\":\"2025-11-01\"}',NULL,1,'2025-11-23 07:13:24');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (187,1,'ATTENDANCE_MASTER',1,'INSERT',NULL,'{\"attendance_emp_id\":1,\"global_emp_code\":\"EMP001\",\"name\":\"Ram Kumar\",\"mobile_no\":\"9876543210\",\"project_id\":1,\"activate_flag\":true}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (188,1,'ATTENDANCE_MASTER',2,'INSERT',NULL,'{\"attendance_emp_id\":2,\"global_emp_code\":\"EMP002\",\"name\":\"Suresh Das\",\"mobile_no\":\"9876543211\",\"project_id\":1,\"activate_flag\":true}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (189,1,'ATTENDANCE_MASTER',3,'INSERT',NULL,'{\"attendance_emp_id\":3,\"global_emp_code\":\"EMP003\",\"name\":\"Amit Singh\",\"mobile_no\":\"9876543212\",\"project_id\":1,\"activate_flag\":true}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (190,1,'ATTENDANCE_MASTER',4,'INSERT',NULL,'{\"attendance_emp_id\":4,\"global_emp_code\":\"EMP004\",\"name\":\"Rajesh Patel\",\"mobile_no\":\"9876543213\",\"project_id\":1,\"activate_flag\":true}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (191,1,'ATTENDANCE_MASTER',5,'INSERT',NULL,'{\"attendance_emp_id\":5,\"global_emp_code\":\"EMP005\",\"name\":\"Vikram Sharma\",\"mobile_no\":\"9876543214\",\"project_id\":1,\"activate_flag\":true}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (192,1,'ATTENDANCE',1,'INSERT',NULL,'{\"attendance_id\":1,\"attendance_emp_id\":1,\"attendance_date\":\"2025-11-23\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (193,1,'ATTENDANCE',2,'INSERT',NULL,'{\"attendance_id\":2,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-23\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (194,1,'ATTENDANCE',3,'INSERT',NULL,'{\"attendance_id\":3,\"attendance_emp_id\":3,\"attendance_date\":\"2025-11-23\",\"in_time\":\"09:15:00\",\"out_time\":\"18:15:00\",\"attendance_type\":\"RFID\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (195,1,'ATTENDANCE',4,'INSERT',NULL,'{\"attendance_id\":4,\"attendance_emp_id\":1,\"attendance_date\":\"2025-11-22\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (196,1,'ATTENDANCE',5,'INSERT',NULL,'{\"attendance_id\":5,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-22\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (197,1,'ATTENDANCE',6,'INSERT',NULL,'{\"attendance_id\":6,\"attendance_emp_id\":3,\"attendance_date\":\"2025-11-22\",\"in_time\":\"09:15:00\",\"out_time\":\"18:15:00\",\"attendance_type\":\"RFID\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (198,1,'ATTENDANCE',7,'INSERT',NULL,'{\"attendance_id\":7,\"attendance_emp_id\":1,\"attendance_date\":\"2025-11-21\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (199,1,'ATTENDANCE',8,'INSERT',NULL,'{\"attendance_id\":8,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-21\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (200,1,'ATTENDANCE',9,'INSERT',NULL,'{\"attendance_id\":9,\"attendance_emp_id\":3,\"attendance_date\":\"2025-11-21\",\"in_time\":\"09:15:00\",\"out_time\":\"18:15:00\",\"attendance_type\":\"RFID\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (201,1,'ATTENDANCE',10,'INSERT',NULL,'{\"attendance_id\":10,\"attendance_emp_id\":1,\"attendance_date\":\"2025-11-20\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (202,1,'ATTENDANCE',11,'INSERT',NULL,'{\"attendance_id\":11,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-20\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (203,1,'ATTENDANCE',12,'INSERT',NULL,'{\"attendance_id\":12,\"attendance_emp_id\":3,\"attendance_date\":\"2025-11-20\",\"in_time\":\"09:15:00\",\"out_time\":\"18:15:00\",\"attendance_type\":\"RFID\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (204,1,'ATTENDANCE',13,'INSERT',NULL,'{\"attendance_id\":13,\"attendance_emp_id\":1,\"attendance_date\":\"2025-11-19\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (205,1,'ATTENDANCE',14,'INSERT',NULL,'{\"attendance_id\":14,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-19\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (206,1,'ATTENDANCE',15,'INSERT',NULL,'{\"attendance_id\":15,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-18\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (207,1,'ATTENDANCE',16,'INSERT',NULL,'{\"attendance_id\":16,\"attendance_emp_id\":2,\"attendance_date\":\"2025-11-17\",\"in_time\":\"08:30:00\",\"out_time\":\"17:30:00\",\"attendance_type\":\"MOBILE\"}',1,'2025-11-23 08:00:09');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (208,1,'projects',6,'INSERT',NULL,'[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-24 10:41:30');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (209,1,'projects',6,'INSERT',NULL,'{\"projectCode\":\"TESTPROJ001\",\"endDate\":\"2025-11-30\",\"projectName\":\"Testing completion\",\"startDate\":\"2025-11-24\"}',1,'2025-11-24 10:41:30');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (210,1,'projects',6,'UPDATE','{\"projectCode\":\"TESTPROJ001\",\"endDate\":\"2025-11-30\",\"projectName\":\"Testing completion\",\"startDate\":\"2025-11-24\",\"status\":\"ACTIVE\"}','{\"projectCode\":\"TESTPROJ001\",\"endDate\":\"2025-11-30\",\"projectName\":\"Testing completion - 24/11\",\"startDate\":\"2025-11-24\",\"status\":\"ACTIVE\"}',1,'2025-11-24 10:42:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (211,1,'projects',6,'UPDATE','[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]','[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion - 24\\/11\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-24 10:42:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (212,1,'wbs',9,'INSERT',NULL,'[{\"wbs_code\":\"TESTWBS001\",\"wbs_name\":\"Test WBS - 24\\/11\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-26\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-24 11:05:10');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (213,1,'wbs',9,'INSERT',NULL,'{\"wbsCode\":\"TESTWBS001\",\"endDate\":\"2025-11-26\",\"wbsName\":\"Test WBS - 24/11\",\"startDate\":\"2025-11-24\"}',1,'2025-11-24 11:05:10');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (214,1,'wbs',10,'INSERT',NULL,'[{\"wbs_code\":\"WBS_LOCKING001\",\"wbs_name\":\"Testing_Lock_WBS\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-24 11:09:28');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (215,1,'wbs',10,'INSERT',NULL,'{\"wbsCode\":\"WBS_LOCKING001\",\"endDate\":\"2025-11-30\",\"wbsName\":\"Testing_Lock_WBS\",\"startDate\":\"2025-11-24\"}',1,'2025-11-24 11:09:28');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (216,1,'tasks',8,'INSERT',NULL,'[{\"task_code\":\"TESTLOCKING\",\"task_name\":\"Testing locking functionalities\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-24 11:11:56');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (217,1,'tasks',8,'INSERT',NULL,'{\"taskCode\":\"TESTLOCKING\",\"endDate\":\"2025-11-30\",\"taskName\":\"Testing locking functionalities\",\"startDate\":\"2025-11-24\"}',1,'2025-11-24 11:11:56');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (218,1,'PLAN_VERSION',8,'INSERT',NULL,'[{\"task_id\":8,\"version_no\":1,\"version_date\":\"2025-11-24\",\"description\":\"Locking testing\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-24 11:12:44');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (219,1,'PLAN_LINES',33,'INSERT',NULL,'[{\"plan_version_id\":8,\"task_id\":8,\"line_number\":1,\"work_date\":\"2025-11-24\",\"planned_qty\":100.00,\"activate_flag\":true}]',0,'2025-11-24 11:12:44');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (220,1,'PLAN_VERSION',8,'INSERT',NULL,'{\"versionNo\":1,\"versionDate\":\"2025-11-24\",\"lineCount\":1}',1,'2025-11-24 11:12:44');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (221,1,'TASK_UPDATES',7,'INSERT',NULL,'[{\"update_date\":\"2025-11-24\",\"planned_qty\":100.00,\"actual_qty\":50.00,\"daily_update_qty\":50.00,\"activate_flag\":true}]',1,'2025-11-24 11:13:55');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (222,1,'task_updates',7,'INSERT',NULL,'{\"updateDate\":\"2025-11-24\",\"actualQty\":50,\"dailyUpdateQty\":50}',1,'2025-11-24 11:13:55');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (223,1,'tasks',8,'UPDATE','[{\"task_code\":\"TESTLOCKING\",\"task_name\":\"Testing locking functionalities\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TESTLOCKING\",\"task_name\":\"Testing locking functionalities\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"planned_qty\":100.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-24 11:13:55');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (224,1,'task_updates',7,'UPDATE','{\"actualQty\":50}','{\"updateDate\":\"2025-11-24\",\"actualQty\":50,\"dailyUpdateQty\":0.00}',1,'2025-11-24 11:19:18');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (225,1,'TASK_UPDATES',7,'UPDATE','[{\"update_date\":\"2025-11-24\",\"planned_qty\":100.00,\"actual_qty\":50.00,\"daily_update_qty\":50.00,\"activate_flag\":true}]','[{\"update_date\":\"2025-11-24\",\"planned_qty\":100.00,\"actual_qty\":50.00,\"daily_update_qty\":0.00,\"activate_flag\":true}]',1,'2025-11-24 11:19:18');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10208,1,'projects',6,'UPDATE','{\"projectCode\":\"TESTPROJ001\",\"endDate\":\"2025-11-30\",\"projectName\":\"Testing completion - 24/11\",\"startDate\":\"2025-11-24\",\"status\":\"ACTIVE\"}','{\"projectCode\":\"TESTPROJ001\",\"endDate\":\"2025-11-30\",\"projectName\":\"Testing completion - 26/11\",\"startDate\":\"2025-11-01\",\"status\":\"ACTIVE\"}',1,'2025-11-26 11:22:06');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10209,1,'projects',6,'UPDATE','[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion - 24\\/11\",\"start_date\":\"2025-11-24\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]','[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion - 26\\/11\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-26 11:22:07');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10210,1,'projects',6,'DELETE','{\"projectCode\":\"TESTPROJ001\",\"projectName\":\"Testing completion - 26/11\",\"activateFlag\":true}',NULL,1,'2025-11-26 11:28:03');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10211,1,'projects',6,'UPDATE','[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion - 26\\/11\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":true}]','[{\"project_code\":\"TESTPROJ001\",\"project_name\":\"Testing completion - 26\\/11\",\"start_date\":\"2025-11-01\",\"end_date\":\"2025-11-30\",\"status\":\"ACTIVE\",\"activate_flag\":false}]',0,'2025-11-26 11:28:03');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10212,1,'projects',6,'DELETE','{\"projectCode\":\"TESTPROJ001\",\"projectName\":\"Testing completion - 26/11\",\"activateFlag\":false}',NULL,1,'2025-11-26 11:28:49');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10213,1,'projects',10006,'INSERT',NULL,'[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-26 11:36:38');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10214,1,'projects',10006,'INSERT',NULL,'{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\"}',1,'2025-11-26 11:36:38');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10215,1,'projects',10006,'UPDATE','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"ACTIVE\"}','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"ACTIVE\"}',1,'2025-11-26 11:40:24');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10216,1,'projects',10006,'UPDATE','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":true}]','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-26 11:40:24');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10217,1,'projects',10006,'UPDATE','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"ACTIVE\"}','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"INACTIVE\"}',1,'2025-11-26 11:44:22');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10218,1,'projects',10006,'UPDATE','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":true}]','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"INACTIVE\",\"activate_flag\":false}]',0,'2025-11-26 11:44:22');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10219,1,'projects',10006,'UPDATE','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"INACTIVE\"}','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"COMPLETED\"}',1,'2025-11-26 11:45:50');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10220,1,'projects',10006,'UPDATE','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"INACTIVE\",\"activate_flag\":false}]','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"COMPLETED\",\"activate_flag\":false}]',0,'2025-11-26 11:45:50');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10221,1,'projects',10006,'UPDATE','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"COMPLETED\"}','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"CANCELLED\"}',1,'2025-11-26 11:46:00');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10222,1,'projects',10006,'UPDATE','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"COMPLETED\",\"activate_flag\":false}]','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"CANCELLED\",\"activate_flag\":false}]',0,'2025-11-26 11:46:00');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10223,1,'projects',10006,'DELETE','{\"projectCode\":\"3643HFCHDH\",\"projectName\":\"234567\",\"activateFlag\":false}',NULL,1,'2025-11-26 11:46:10');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10224,1,'projects',10006,'UPDATE','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"CANCELLED\"}','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"ACTIVE\"}',1,'2025-11-26 11:46:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10225,1,'projects',10006,'UPDATE','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"CANCELLED\",\"activate_flag\":false}]','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":false}]',0,'2025-11-26 11:46:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10226,1,'projects',10006,'UPDATE','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"ACTIVE\"}','{\"projectCode\":\"3643HFCHDH\",\"endDate\":\"2025-11-19\",\"projectName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"ACTIVE\"}',1,'2025-11-26 11:46:30');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10227,1,'projects',10006,'UPDATE','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":false}]','[{\"project_code\":\"3643HFCHDH\",\"project_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"ACTIVE\",\"activate_flag\":true}]',0,'2025-11-26 11:46:30');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10228,1,'wbs',10009,'INSERT',NULL,'[{\"wbs_code\":\"2345678\",\"wbs_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-26 12:02:02');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10229,1,'wbs',10009,'INSERT',NULL,'{\"wbsCode\":\"2345678\",\"endDate\":\"2025-11-19\",\"wbsName\":\"234567\",\"startDate\":\"2025-11-05\"}',1,'2025-11-26 12:02:02');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10230,1,'wbs',10009,'UPDATE','{\"wbsCode\":\"2345678\",\"endDate\":\"2025-11-19\",\"wbsName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"PLANNED\"}','{\"wbsCode\":\"2345678\",\"endDate\":\"2025-11-19\",\"wbsName\":\"234567\",\"startDate\":\"2025-11-05\",\"status\":\"PLANNED\"}',1,'2025-11-26 12:04:05');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10231,1,'wbs',10009,'UPDATE','[{\"wbs_code\":\"2345678\",\"wbs_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"wbs_code\":\"2345678\",\"wbs_name\":\"234567\",\"start_date\":\"2025-11-05\",\"end_date\":\"2025-11-19\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-26 12:04:05');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10232,1,'ATTENDANCE_MASTER',6,'INSERT',NULL,'{\"attendance_emp_id\":6,\"global_emp_code\":\"EMP010\",\"name\":\"Abhayanand Siddharth\",\"mobile_no\":\"1234567890123456789\",\"project_id\":5,\"activate_flag\":true}',1,'2025-11-26 06:50:46');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10233,1,'ATTENDANCE_MASTER',6,'INSERT',NULL,'{\"globalEmpCode\":\"EMP010\",\"name\":\"Abhayanand Siddharth\",\"mobileNo\":\"1234567890123456789\",\"projectId\":5}',1,'2025-11-26 12:20:46');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10234,1,'PLAN_VERSION',10008,'INSERT',NULL,'[{\"task_id\":3,\"version_no\":1,\"version_date\":\"2025-11-28\",\"is_active\":true,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10235,1,'PLAN_LINES',10033,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":1,\"work_date\":\"2024-02-01\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10236,1,'PLAN_LINES',10034,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":2,\"work_date\":\"2024-02-02\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10237,1,'PLAN_LINES',10035,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":3,\"work_date\":\"2024-02-03\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10238,1,'PLAN_LINES',10036,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":4,\"work_date\":\"2024-02-04\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10239,1,'PLAN_LINES',10037,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":5,\"work_date\":\"2024-02-05\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10240,1,'PLAN_LINES',10038,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":6,\"work_date\":\"2024-02-06\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10241,1,'PLAN_LINES',10039,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":7,\"work_date\":\"2024-02-07\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10242,1,'PLAN_LINES',10040,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":8,\"work_date\":\"2024-02-08\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10243,1,'PLAN_LINES',10041,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":9,\"work_date\":\"2024-02-09\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10244,1,'PLAN_LINES',10042,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":10,\"work_date\":\"2024-02-10\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10245,1,'PLAN_LINES',10043,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":11,\"work_date\":\"2024-02-11\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10246,1,'PLAN_LINES',10044,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":12,\"work_date\":\"2024-02-12\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10247,1,'PLAN_LINES',10045,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":13,\"work_date\":\"2024-02-13\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10248,1,'PLAN_LINES',10046,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":14,\"work_date\":\"2024-02-14\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10249,1,'PLAN_LINES',10047,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":15,\"work_date\":\"2024-02-15\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10250,1,'PLAN_LINES',10048,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":16,\"work_date\":\"2024-02-16\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10251,1,'PLAN_LINES',10049,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":17,\"work_date\":\"2024-02-17\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10252,1,'PLAN_LINES',10050,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":18,\"work_date\":\"2024-02-18\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10253,1,'PLAN_LINES',10051,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":19,\"work_date\":\"2024-02-19\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10254,1,'PLAN_LINES',10052,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":20,\"work_date\":\"2024-02-20\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10255,1,'PLAN_LINES',10053,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":21,\"work_date\":\"2024-02-21\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10256,1,'PLAN_LINES',10054,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":22,\"work_date\":\"2024-02-22\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10257,1,'PLAN_LINES',10055,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":23,\"work_date\":\"2024-02-23\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10258,1,'PLAN_LINES',10056,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":24,\"work_date\":\"2024-02-24\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10259,1,'PLAN_LINES',10057,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":25,\"work_date\":\"2024-02-25\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10260,1,'PLAN_LINES',10058,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":26,\"work_date\":\"2024-02-26\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10261,1,'PLAN_LINES',10059,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":27,\"work_date\":\"2024-02-27\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10262,1,'PLAN_LINES',10060,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":28,\"work_date\":\"2024-02-28\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10263,1,'PLAN_LINES',10061,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":29,\"work_date\":\"2024-02-29\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10264,1,'PLAN_LINES',10062,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":30,\"work_date\":\"2024-03-01\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10265,1,'PLAN_LINES',10063,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":31,\"work_date\":\"2024-03-02\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10266,1,'PLAN_LINES',10064,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":32,\"work_date\":\"2024-03-03\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10267,1,'PLAN_LINES',10065,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":33,\"work_date\":\"2024-03-04\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10268,1,'PLAN_LINES',10066,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":34,\"work_date\":\"2024-03-05\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10269,1,'PLAN_LINES',10067,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":35,\"work_date\":\"2024-03-06\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10270,1,'PLAN_LINES',10068,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":36,\"work_date\":\"2024-03-07\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10271,1,'PLAN_LINES',10069,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":37,\"work_date\":\"2024-03-08\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10272,1,'PLAN_LINES',10070,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":38,\"work_date\":\"2024-03-09\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10273,1,'PLAN_LINES',10071,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":39,\"work_date\":\"2024-03-10\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10274,1,'PLAN_LINES',10072,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":40,\"work_date\":\"2024-03-11\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10275,1,'PLAN_LINES',10073,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":41,\"work_date\":\"2024-03-12\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10276,1,'PLAN_LINES',10074,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":42,\"work_date\":\"2024-03-13\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10277,1,'PLAN_LINES',10075,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":43,\"work_date\":\"2024-03-14\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10278,1,'PLAN_LINES',10076,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":44,\"work_date\":\"2024-03-15\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10279,1,'PLAN_LINES',10077,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":45,\"work_date\":\"2024-03-16\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10280,1,'PLAN_LINES',10078,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":46,\"work_date\":\"2024-03-17\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10281,1,'PLAN_LINES',10079,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":47,\"work_date\":\"2024-03-18\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10282,1,'PLAN_LINES',10080,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":48,\"work_date\":\"2024-03-19\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10283,1,'PLAN_LINES',10081,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":49,\"work_date\":\"2024-03-20\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10284,1,'PLAN_LINES',10082,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":50,\"work_date\":\"2024-03-21\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10285,1,'PLAN_LINES',10083,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":51,\"work_date\":\"2024-03-22\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:33');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10286,1,'PLAN_LINES',10084,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":52,\"work_date\":\"2024-03-23\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10287,1,'PLAN_LINES',10085,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":53,\"work_date\":\"2024-03-24\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10288,1,'PLAN_LINES',10086,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":54,\"work_date\":\"2024-03-25\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10289,1,'PLAN_LINES',10087,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":55,\"work_date\":\"2024-03-26\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10290,1,'PLAN_LINES',10088,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":56,\"work_date\":\"2024-03-27\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10291,1,'PLAN_LINES',10089,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":57,\"work_date\":\"2024-03-28\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10292,1,'PLAN_LINES',10090,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":58,\"work_date\":\"2024-03-29\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10293,1,'PLAN_LINES',10091,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":59,\"work_date\":\"2024-03-30\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10294,1,'PLAN_LINES',10092,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":60,\"work_date\":\"2024-03-31\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10295,1,'PLAN_LINES',10093,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":61,\"work_date\":\"2024-04-01\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10296,1,'PLAN_LINES',10094,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":62,\"work_date\":\"2024-04-02\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10297,1,'PLAN_LINES',10095,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":63,\"work_date\":\"2024-04-03\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10298,1,'PLAN_LINES',10096,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":64,\"work_date\":\"2024-04-04\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10299,1,'PLAN_LINES',10097,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":65,\"work_date\":\"2024-04-05\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10300,1,'PLAN_LINES',10098,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":66,\"work_date\":\"2024-04-06\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10301,1,'PLAN_LINES',10099,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":67,\"work_date\":\"2024-04-07\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10302,1,'PLAN_LINES',10100,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":68,\"work_date\":\"2024-04-08\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10303,1,'PLAN_LINES',10101,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":69,\"work_date\":\"2024-04-09\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10304,1,'PLAN_LINES',10102,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":70,\"work_date\":\"2024-04-10\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10305,1,'PLAN_LINES',10103,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":71,\"work_date\":\"2024-04-11\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10306,1,'PLAN_LINES',10104,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":72,\"work_date\":\"2024-04-12\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10307,1,'PLAN_LINES',10105,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":73,\"work_date\":\"2024-04-13\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10308,1,'PLAN_LINES',10106,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":74,\"work_date\":\"2024-04-14\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10309,1,'PLAN_LINES',10107,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":75,\"work_date\":\"2024-04-15\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10310,1,'PLAN_LINES',10108,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":76,\"work_date\":\"2024-04-16\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10311,1,'PLAN_LINES',10109,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":77,\"work_date\":\"2024-04-17\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10312,1,'PLAN_LINES',10110,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":78,\"work_date\":\"2024-04-18\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10313,1,'PLAN_LINES',10111,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":79,\"work_date\":\"2024-04-19\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10314,1,'PLAN_LINES',10112,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":80,\"work_date\":\"2024-04-20\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10315,1,'PLAN_LINES',10113,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":81,\"work_date\":\"2024-04-21\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10316,1,'PLAN_LINES',10114,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":82,\"work_date\":\"2024-04-22\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10317,1,'PLAN_LINES',10115,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":83,\"work_date\":\"2024-04-23\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10318,1,'PLAN_LINES',10116,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":84,\"work_date\":\"2024-04-24\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10319,1,'PLAN_LINES',10117,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":85,\"work_date\":\"2024-04-25\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10320,1,'PLAN_LINES',10118,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":86,\"work_date\":\"2024-04-26\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10321,1,'PLAN_LINES',10119,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":87,\"work_date\":\"2024-04-27\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10322,1,'PLAN_LINES',10120,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":88,\"work_date\":\"2024-04-28\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10323,1,'PLAN_LINES',10121,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":89,\"work_date\":\"2024-04-29\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10324,1,'PLAN_LINES',10122,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":90,\"work_date\":\"2024-04-30\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10325,1,'PLAN_LINES',10123,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":91,\"work_date\":\"2024-05-01\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10326,1,'PLAN_LINES',10124,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":92,\"work_date\":\"2024-05-02\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10327,1,'PLAN_LINES',10125,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":93,\"work_date\":\"2024-05-03\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10328,1,'PLAN_LINES',10126,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":94,\"work_date\":\"2024-05-04\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10329,1,'PLAN_LINES',10127,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":95,\"work_date\":\"2024-05-05\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10330,1,'PLAN_LINES',10128,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":96,\"work_date\":\"2024-05-06\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10331,1,'PLAN_LINES',10129,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":97,\"work_date\":\"2024-05-07\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10332,1,'PLAN_LINES',10130,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":98,\"work_date\":\"2024-05-08\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10333,1,'PLAN_LINES',10131,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":99,\"work_date\":\"2024-05-09\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10334,1,'PLAN_LINES',10132,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":100,\"work_date\":\"2024-05-10\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10335,1,'PLAN_LINES',10133,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":101,\"work_date\":\"2024-05-11\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10336,1,'PLAN_LINES',10134,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":102,\"work_date\":\"2024-05-12\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10337,1,'PLAN_LINES',10135,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":103,\"work_date\":\"2024-05-13\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10338,1,'PLAN_LINES',10136,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":104,\"work_date\":\"2024-05-14\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10339,1,'PLAN_LINES',10137,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":105,\"work_date\":\"2024-05-15\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10340,1,'PLAN_LINES',10138,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":106,\"work_date\":\"2024-05-16\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10341,1,'PLAN_LINES',10139,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":107,\"work_date\":\"2024-05-17\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10342,1,'PLAN_LINES',10140,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":108,\"work_date\":\"2024-05-18\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10343,1,'PLAN_LINES',10141,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":109,\"work_date\":\"2024-05-19\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10344,1,'PLAN_LINES',10142,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":110,\"work_date\":\"2024-05-20\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10345,1,'PLAN_LINES',10143,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":111,\"work_date\":\"2024-05-21\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10346,1,'PLAN_LINES',10144,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":112,\"work_date\":\"2024-05-22\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10347,1,'PLAN_LINES',10145,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":113,\"work_date\":\"2024-05-23\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10348,1,'PLAN_LINES',10146,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":114,\"work_date\":\"2024-05-24\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10349,1,'PLAN_LINES',10147,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":115,\"work_date\":\"2024-05-25\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10350,1,'PLAN_LINES',10148,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":116,\"work_date\":\"2024-05-26\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10351,1,'PLAN_LINES',10149,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":117,\"work_date\":\"2024-05-27\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10352,1,'PLAN_LINES',10150,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":118,\"work_date\":\"2024-05-28\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10353,1,'PLAN_LINES',10151,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":119,\"work_date\":\"2024-05-29\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10354,1,'PLAN_LINES',10152,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":120,\"work_date\":\"2024-05-30\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10355,1,'PLAN_LINES',10153,'INSERT',NULL,'[{\"plan_version_id\":10008,\"task_id\":3,\"line_number\":121,\"work_date\":\"2024-05-31\",\"planned_qty\":9.92,\"activate_flag\":true}]',0,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (10356,1,'PLAN_VERSION',10008,'INSERT',NULL,'{\"versionNo\":1,\"versionDate\":\"2025-11-28\",\"lineCount\":121}',1,'2025-11-28 15:54:34');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20234,1,'TASK_UPDATES',10007,'INSERT',NULL,'[{\"update_date\":\"2024-02-01\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20235,1,'task_updates',10007,'INSERT',NULL,'{\"updateDate\":\"2024-02-01\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20236,1,'TASK_UPDATES',10008,'INSERT',NULL,'[{\"update_date\":\"2024-02-02\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20237,1,'task_updates',10008,'INSERT',NULL,'{\"updateDate\":\"2024-02-02\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20238,1,'TASK_UPDATES',10009,'INSERT',NULL,'[{\"update_date\":\"2024-02-03\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20239,1,'task_updates',10009,'INSERT',NULL,'{\"updateDate\":\"2024-02-03\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20240,1,'TASK_UPDATES',10010,'INSERT',NULL,'[{\"update_date\":\"2024-02-04\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20241,1,'task_updates',10010,'INSERT',NULL,'{\"updateDate\":\"2024-02-04\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20242,1,'TASK_UPDATES',10011,'INSERT',NULL,'[{\"update_date\":\"2024-02-05\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20243,1,'task_updates',10011,'INSERT',NULL,'{\"updateDate\":\"2024-02-05\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20244,1,'TASK_UPDATES',10012,'INSERT',NULL,'[{\"update_date\":\"2024-02-06\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20245,1,'task_updates',10012,'INSERT',NULL,'{\"updateDate\":\"2024-02-06\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:19');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20246,1,'TASK_UPDATES',10013,'INSERT',NULL,'[{\"update_date\":\"2024-02-07\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20247,1,'task_updates',10013,'INSERT',NULL,'{\"updateDate\":\"2024-02-07\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20248,1,'TASK_UPDATES',10014,'INSERT',NULL,'[{\"update_date\":\"2024-02-08\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20249,1,'task_updates',10014,'INSERT',NULL,'{\"updateDate\":\"2024-02-08\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20250,1,'TASK_UPDATES',10015,'INSERT',NULL,'[{\"update_date\":\"2024-02-09\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20251,1,'task_updates',10015,'INSERT',NULL,'{\"updateDate\":\"2024-02-09\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20252,1,'TASK_UPDATES',10016,'INSERT',NULL,'[{\"update_date\":\"2024-02-10\",\"planned_qty\":9.92,\"actual_qty\":9.00,\"daily_update_qty\":9.00,\"activate_flag\":true}]',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20253,1,'task_updates',10016,'INSERT',NULL,'{\"updateDate\":\"2024-02-10\",\"actualQty\":9,\"dailyUpdateQty\":9}',1,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20254,1,'tasks',3,'UPDATE','[{\"task_code\":\"TASK003\",\"task_name\":\"Backend Development\",\"start_date\":\"2024-02-01\",\"end_date\":\"2024-05-31\",\"planned_qty\":1200.00,\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"task_code\":\"TASK003\",\"task_name\":\"Backend Development\",\"start_date\":\"2024-02-01\",\"end_date\":\"2024-05-31\",\"planned_qty\":1200.00,\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-29 10:31:20');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20255,1,'MANPOWER_ALLOCATIONS',2,'INSERT',NULL,'{\"allocation_id\":2,\"wbs_id\":3,\"employee_id\":4,\"start_date\":\"2024-02-02\",\"end_date\":\"2024-02-06\",\"hours_assigned\":8.00,\"duration_days\":5,\"total_cost\":4100.00,\"remarks\":\"\"}',1,'2025-11-29 05:33:31');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20256,1,'MANPOWER_ALLOCATIONS',2,'INSERT',NULL,'{\"allocationId\":2,\"wbsId\":3,\"employeeId\":4,\"startDate\":\"2024-02-02\",\"endDate\":\"2024-02-06\",\"hoursAssigned\":8,\"durationDays\":5,\"dailyRate\":820.00,\"totalCost\":4100.00,\"remarks\":\"\"}',1,'2025-11-29 11:03:31');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20257,1,'MANPOWER_ALLOCATIONS',3,'INSERT',NULL,'{\"allocation_id\":3,\"wbs_id\":3,\"employee_id\":10,\"start_date\":\"2024-02-13\",\"end_date\":\"2024-02-29\",\"hours_assigned\":8.00,\"duration_days\":17,\"total_cost\":8500.00,\"remarks\":\"\"}',1,'2025-11-29 05:34:24');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20258,1,'MANPOWER_ALLOCATIONS',3,'INSERT',NULL,'{\"allocationId\":3,\"wbsId\":3,\"employeeId\":10,\"startDate\":\"2024-02-13\",\"endDate\":\"2024-02-29\",\"hoursAssigned\":8,\"durationDays\":17,\"dailyRate\":500.00,\"totalCost\":8500.00,\"remarks\":\"\"}',1,'2025-11-29 11:04:24');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20259,1,'EQUIPMENT_ALLOCATIONS',2,'INSERT',NULL,'{\"allocation_id\":2,\"wbs_id\":3,\"equipment_id\":1,\"start_date\":\"2024-09-01\",\"end_date\":\"2024-10-04\",\"hours_assigned\":5.00,\"duration_days\":34,\"total_cost\":119000.00,\"remarks\":\"\"}',1,'2025-11-29 05:37:36');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20260,1,'EQUIPMENT_ALLOCATIONS',2,'INSERT',NULL,'{\"allocationId\":2,\"wbsId\":3,\"equipmentId\":1,\"startDate\":\"2024-09-01\",\"endDate\":\"2024-10-04\",\"hoursAssigned\":5,\"durationDays\":34,\"dailyRate\":3500.00,\"totalCost\":119000.00,\"remarks\":\"\"}',1,'2025-11-29 11:07:36');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20261,1,'EQUIPMENT_ALLOCATIONS',2,'DELETE','{\"allocationId\":2,\"wbsId\":3,\"equipmentId\":1,\"startDate\":\"2024-09-01\",\"endDate\":\"2024-10-04\",\"hoursAssigned\":5.00,\"durationDays\":34,\"dailyRate\":3500.00,\"totalCost\":119000.00,\"remarks\":\"\"}',NULL,1,'2025-11-29 11:26:53');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20262,1,'EQUIPMENT_ALLOCATIONS',2,'DELETE','{\"allocation_id\":2,\"wbs_id\":3,\"equipment_id\":1,\"start_date\":\"2024-09-01\",\"end_date\":\"2024-10-04\",\"hours_assigned\":5.00,\"duration_days\":34,\"total_cost\":119000.00,\"remarks\":\"\"}',NULL,1,'2025-11-29 05:56:53');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20263,1,'CONFIRMATIONS',2,'INSERT',NULL,'[{\"entity_type\":\"WBS\",\"entity_id\":3,\"confirmation_date\":\"2024-02-01\",\"confirmed_by\":1,\"confirmed_on\":\"2025-11-29T13:01:42.8408449\"}]',1,'2025-11-29 07:31:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20264,1,'CONFIRMATIONS',2,'INSERT',NULL,'{\"confirmationDate\":\"2024-02-01\",\"entityType\":\"WBS\",\"entityId\":3,\"remarks\":null}',1,'2025-11-29 13:01:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20265,1,'CONFIRMATION_LOCKS',2,'INSERT',NULL,'[{\"lock_date\":\"2024-02-05\"}]',1,'2025-11-29 07:31:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20266,1,'CONFIRMATION_LOCKS',2,'INSERT',NULL,'{\"lockDate\":\"2024-02-05\",\"wbsId\":3}',1,'2025-11-29 13:01:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (20267,1,'wbs',3,'UPDATE','[{\"wbs_code\":\"WBS003\",\"wbs_name\":\"Development Phase\",\"start_date\":\"2024-02-01\",\"end_date\":\"2024-08-31\",\"status\":\"PLANNED\",\"activate_flag\":true}]','[{\"wbs_code\":\"WBS003\",\"wbs_name\":\"Development Phase\",\"start_date\":\"2024-02-01\",\"end_date\":\"2024-08-31\",\"status\":\"PLANNED\",\"activate_flag\":true}]',0,'2025-11-29 13:01:43');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30255,1,'ATTENDANCE_MASTER',6,'UPDATE','{\"employeeType\":\"EMPLOYEE\",\"countryCode\":null,\"globalEmpCode\":\"EMP010\",\"contractorCode\":null,\"name\":\"Abhayanand Siddharth\",\"ratePerDay\":null,\"emailId\":null,\"mobileNo\":\"1234567890123456789\",\"designation\":null,\"skillLevel\":null,\"projectId\":5}','{\"employeeType\":\"EMPLOYEE\",\"countryCode\":\"+91\",\"globalEmpCode\":\"EMP010\",\"contractorCode\":null,\"name\":\"Abhayanand Siddharth\",\"emailId\":\"sidd.anand2000@gmail.com\",\"mobileNo\":\"7266098685\",\"designation\":\"Enginner\",\"skillLevel\":\"SKILLED\",\"projectId\":2}',1,'2025-11-30 14:13:54');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30256,1,'ATTENDANCE_MASTER',6,'UPDATE','{\"attendance_emp_id\":6,\"global_emp_code\":\"EMP010\",\"name\":\"Abhayanand Siddharth\",\"mobile_no\":\"1234567890123456789\",\"project_id\":5,\"activate_flag\":true}','{\"attendance_emp_id\":6,\"global_emp_code\":\"EMP010\",\"name\":\"Abhayanand Siddharth\",\"mobile_no\":\"7266098685\",\"project_id\":2,\"activate_flag\":true}',1,'2025-11-30 08:43:55');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30257,1,'ATTENDANCE',17,'INSERT',NULL,'{\"attendance_id\":17,\"attendance_emp_id\":6,\"attendance_date\":\"2024-02-01\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-30 09:04:21');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30258,1,'ATTENDANCE',17,'INSERT',NULL,'{\"inTime\":\"09:00\",\"attendanceType\":\"ADMIN\",\"attendanceEmpId\":6,\"attendanceDate\":\"2024-02-01\",\"outTime\":\"18:00\"}',1,'2025-11-30 14:34:21');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30259,1,'ATTENDANCE',18,'INSERT',NULL,'{\"attendance_id\":18,\"attendance_emp_id\":6,\"attendance_date\":\"2024-02-10\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-30 09:05:04');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30260,1,'ATTENDANCE',18,'INSERT',NULL,'{\"inTime\":\"09:00\",\"attendanceType\":\"ADMIN\",\"attendanceEmpId\":6,\"attendanceDate\":\"2024-02-10\",\"outTime\":\"18:00\"}',1,'2025-11-30 14:35:04');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30261,1,'ATTENDANCE',19,'INSERT',NULL,'{\"attendance_id\":19,\"attendance_emp_id\":6,\"attendance_date\":\"2024-02-02\",\"in_time\":\"09:00:00\",\"out_time\":\"18:00:00\",\"attendance_type\":\"ADMIN\"}',1,'2025-11-30 09:06:11');
INSERT INTO `audit_logs` (`audit_id`, `tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`) VALUES (30262,1,'ATTENDANCE',19,'INSERT',NULL,'{\"inTime\":\"09:00\",\"attendanceType\":\"ADMIN\",\"attendanceEmpId\":6,\"attendanceDate\":\"2024-02-02\",\"outTime\":\"18:00\"}',1,'2025-11-30 14:36:11');

--
-- Table structure for table `business_rules`
--

CREATE TABLE `business_rules` (
  `rule_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `rule_number` int NOT NULL,
  `control_point` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `applicability` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL,
  `rule_value` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`rule_id`),
  UNIQUE KEY `UQ_business_rules_tenant_rule_number` (`tenant_id`,`rule_number`),
  UNIQUE KEY `idx_business_rules_tenant_rule_number` (`tenant_id`,`rule_number`),
  KEY `idx_business_rules_tenant_control_point` (`tenant_id`,`control_point`),
  KEY `idx_business_rules_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_business_rules_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `business_rules`
--

INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,101,'TASK_UPDATE','Y','7','Maximum number of days allowed for backdating task updates.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,102,'TASK_UPDATE','Y','N','Whether backdating is allowed after lock date. Y = allowed, N = not allowed.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,201,'TASK','Y','','Task start date cannot be in the future.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,202,'WBS','Y','','WBS end date cannot be before start date.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,203,'ALLOCATION','Y','','Resource allocation end date cannot be before start date.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,204,'ATTENDANCE','Y','','Attendance date cannot be in the future.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,205,'MATERIAL_USAGE','Y','','Material usage date cannot be in the future and quantity cannot be negative.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,301,'CONFIRMATION','Y','','Confirmed entries cannot be modified or overwritten.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (9,1,401,'TASK_UPDATE','Y','','Daily update quantity cannot exceed the planned quantity.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10,1,402,'PLAN_VERSION','Y','','Plan version date must be valid and cannot be in the future.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (11,1,501,'ALLOCATION','Y','','Manpower allocation end date must be on or after the start date.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (12,1,601,'ATTENDANCE','Y','','Attendance date cannot be in the future.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (13,2,601,'RESOURCE_ALLOCATION','Y',NULL,'Allocation dates must stay within WBS dates',1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (14,1,602,'RESOURCE_ALLOCATION','Y',NULL,'Prevent overlapping allocations for the same resource',1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (15,2,602,'RESOURCE_ALLOCATION','Y',NULL,'Prevent overlapping allocations for the same resource',1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `business_rules` (`rule_id`, `tenant_id`, `rule_number`, `control_point`, `applicability`, `rule_value`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (16,2,301,'TASK_UPDATE','Y','30','Maximum number of days allowed for future date updates. Value represents the number of days. Applies to all entities where rule 101 applies.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');

--
-- Table structure for table `confirmation_locks`
--

CREATE TABLE `confirmation_locks` (
  `lock_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `wbs_id` bigint NOT NULL,
  `lock_date` date NOT NULL,
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`lock_id`),
  UNIQUE KEY `uk_confirmation_locks_wbs` (`tenant_id`,`wbs_id`),
  KEY `fk_confirmation_locks_wbs` (`wbs_id`),
  KEY `idx_confirmation_locks_tenant` (`tenant_id`),
  KEY `idx_confirmation_locks_wbs` (`tenant_id`,`wbs_id`),
  CONSTRAINT `fk_confirmation_locks_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_confirmation_locks_wbs` FOREIGN KEY (`wbs_id`) REFERENCES `wbs` (`wbs_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `confirmation_locks`
--

INSERT INTO `confirmation_locks` (`lock_id`, `tenant_id`, `wbs_id`, `lock_date`, `created_by`, `created_on`, `updated_on`) VALUES (1,1,1,'2025-11-10',1,'2025-11-22 05:57:27','2025-11-22 05:57:27');
INSERT INTO `confirmation_locks` (`lock_id`, `tenant_id`, `wbs_id`, `lock_date`, `created_by`, `created_on`, `updated_on`) VALUES (2,1,3,'2024-02-05',1,'2025-11-29 13:01:43','2025-11-29 13:01:43');

--
-- Table structure for table `confirmations`
--

CREATE TABLE `confirmations` (
  `confirmation_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `entity_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_id` bigint NOT NULL,
  `confirmation_date` date NOT NULL,
  `confirmation_end_date` date DEFAULT NULL,
  `confirmed_qty` decimal(18,2) DEFAULT NULL,
  `confirmed_by` bigint NOT NULL,
  `confirmed_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `remarks` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`confirmation_id`),
  KEY `idx_confirmations_tenant_id` (`tenant_id`),
  KEY `idx_confirmations_entity` (`tenant_id`,`entity_type`,`entity_id`),
  KEY `idx_confirmations_date` (`tenant_id`,`confirmation_date`),
  KEY `idx_confirmations_date_range` (`tenant_id`,`confirmation_date`,`confirmation_end_date`),
  CONSTRAINT `fk_confirmations_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `confirmations`
--

INSERT INTO `confirmations` (`confirmation_id`, `tenant_id`, `entity_type`, `entity_id`, `confirmation_date`, `confirmation_end_date`, `confirmed_qty`, `confirmed_by`, `confirmed_on`, `remarks`, `created_by`, `created_on`) VALUES (1,1,'WBS',1,'2025-11-10',NULL,NULL,1,'2025-11-22 05:57:27','Seeded freeze for Site Mobilisation',1,'2025-11-22 05:57:27');
INSERT INTO `confirmations` (`confirmation_id`, `tenant_id`, `entity_type`, `entity_id`, `confirmation_date`, `confirmation_end_date`, `confirmed_qty`, `confirmed_by`, `confirmed_on`, `remarks`, `created_by`, `created_on`) VALUES (2,1,'WBS',3,'2024-02-01','2024-02-05',50.00,1,'2025-11-29 13:01:43',NULL,1,'2025-11-29 13:01:43');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_confirmations_audit` AFTER INSERT ON `confirmations` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'confirmations',
        NEW.confirmation_id,
        'INSERT',
        JSON_OBJECT(
            'entity_type', NEW.entity_type,
            'entity_id', NEW.entity_id,
            'confirmation_date', NEW.confirmation_date,
            'confirmed_by', NEW.confirmed_by
        ),
        COALESCE(NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `employee_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `skill_level` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate_per_day` decimal(18,2) NOT NULL DEFAULT '0.00',
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`employee_id`),
  KEY `idx_employees_tenant` (`tenant_id`),
  KEY `idx_employees_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_employees_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,'Ram Kumar','Mason',800.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,'Suresh Das','Electrician',950.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,'Ravi Singh','Carpenter',780.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,'Anil Verma','Bar Bender',820.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,'Farhan Ali','Painter',700.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,'Gopal Mehta','Foreman',1100.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,'Joseph Mathew','Welder',900.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,'Prakash Jha','Plumber',850.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (9,1,'Santhosh Nair','Supervisor',1200.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10,1,'Mukesh Rao','Helper',500.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `employees` (`employee_id`, `tenant_id`, `name`, `skill_level`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (11,1,'Vikas Yadav','Scaffolder',650.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');

--
-- Table structure for table `equipment`
--

CREATE TABLE `equipment` (
  `equipment_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `equipment_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `equipment_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate_per_day` decimal(18,2) NOT NULL DEFAULT '0.00',
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`equipment_id`),
  KEY `idx_equipment_tenant` (`tenant_id`),
  KEY `idx_equipment_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_equipment_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `equipment`
--

INSERT INTO `equipment` (`equipment_id`, `tenant_id`, `equipment_name`, `equipment_type`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,'JCB Excavator','Earth Moving',3500.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `equipment` (`equipment_id`, `tenant_id`, `equipment_name`, `equipment_type`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,'Concrete Mixer','Concrete Works',1500.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `equipment` (`equipment_id`, `tenant_id`, `equipment_name`, `equipment_type`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,'Tower Crane','Lifting',5000.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `equipment` (`equipment_id`, `tenant_id`, `equipment_name`, `equipment_type`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,'Vibratory Roller','Compaction',2800.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `equipment` (`equipment_id`, `tenant_id`, `equipment_name`, `equipment_type`, `rate_per_day`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,'Water Tanker','Logistics',900.00,1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');

--
-- Table structure for table `equipment_allocations`
--

CREATE TABLE `equipment_allocations` (
  `allocation_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `wbs_id` bigint NOT NULL,
  `equipment_id` bigint NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `hours_assigned` decimal(9,2) DEFAULT NULL,
  `duration_days` bigint DEFAULT NULL,
  `daily_rate` decimal(18,2) DEFAULT NULL,
  `total_cost` decimal(18,2) DEFAULT NULL,
  `remarks` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`allocation_id`),
  KEY `fk_equipment_alloc_wbs` (`wbs_id`),
  KEY `fk_equipment_alloc_equipment` (`equipment_id`),
  KEY `idx_equipment_alloc_tenant` (`tenant_id`),
  KEY `idx_equipment_alloc_wbs` (`tenant_id`,`wbs_id`),
  KEY `idx_equipment_alloc_resource` (`tenant_id`,`equipment_id`,`start_date`,`end_date`),
  CONSTRAINT `fk_equipment_alloc_equipment` FOREIGN KEY (`equipment_id`) REFERENCES `equipment` (`equipment_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_equipment_alloc_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_equipment_alloc_wbs` FOREIGN KEY (`wbs_id`) REFERENCES `wbs` (`wbs_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `equipment_allocations`
--

INSERT INTO `equipment_allocations` (`allocation_id`, `tenant_id`, `wbs_id`, `equipment_id`, `start_date`, `end_date`, `hours_assigned`, `duration_days`, `daily_rate`, `total_cost`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,1,1,'2025-11-22','2025-11-26',10.00,5,3500.00,17500.00,'Excavation support for WBS 2.1',1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_equipment_allocations_audit` AFTER INSERT ON `equipment_allocations` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'EQUIPMENT_ALLOCATIONS',
        NEW.allocation_id,
        'INSERT',
        JSON_OBJECT(
            'allocation_id', NEW.allocation_id,
            'wbs_id', NEW.wbs_id,
            'equipment_id', NEW.equipment_id,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'hours_assigned', NEW.hours_assigned,
            'total_cost', NEW.total_cost
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_equipment_allocations_audit_update` AFTER UPDATE ON `equipment_allocations` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'EQUIPMENT_ALLOCATIONS',
        NEW.allocation_id,
        'UPDATE',
        JSON_OBJECT(
            'allocation_id', OLD.allocation_id,
            'wbs_id', OLD.wbs_id,
            'equipment_id', OLD.equipment_id,
            'start_date', OLD.start_date,
            'end_date', OLD.end_date,
            'hours_assigned', OLD.hours_assigned,
            'total_cost', OLD.total_cost
        ),
        JSON_OBJECT(
            'allocation_id', NEW.allocation_id,
            'wbs_id', NEW.wbs_id,
            'equipment_id', NEW.equipment_id,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'hours_assigned', NEW.hours_assigned,
            'total_cost', NEW.total_cost
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `manpower_allocations`
--

CREATE TABLE `manpower_allocations` (
  `allocation_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `wbs_id` bigint NOT NULL,
  `employee_id` bigint NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `hours_assigned` decimal(9,2) DEFAULT NULL,
  `duration_days` bigint DEFAULT NULL,
  `daily_rate` decimal(18,2) DEFAULT NULL,
  `total_cost` decimal(18,2) DEFAULT NULL,
  `remarks` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`allocation_id`),
  KEY `fk_manpower_alloc_wbs` (`wbs_id`),
  KEY `fk_manpower_alloc_employee` (`employee_id`),
  KEY `idx_manpower_alloc_tenant` (`tenant_id`),
  KEY `idx_manpower_alloc_wbs` (`tenant_id`,`wbs_id`),
  KEY `idx_manpower_alloc_employee` (`tenant_id`,`employee_id`,`start_date`,`end_date`),
  CONSTRAINT `fk_manpower_alloc_employee` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`employee_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_manpower_alloc_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_manpower_alloc_wbs` FOREIGN KEY (`wbs_id`) REFERENCES `wbs` (`wbs_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `manpower_allocations`
--

INSERT INTO `manpower_allocations` (`allocation_id`, `tenant_id`, `wbs_id`, `employee_id`, `start_date`, `end_date`, `hours_assigned`, `duration_days`, `daily_rate`, `total_cost`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,1,1,'2025-11-12','2025-11-21',8.00,10,800.00,8000.00,'10-day masonry package',1,1,'2025-11-21 19:47:41',1,'2025-11-21 19:47:41');
INSERT INTO `manpower_allocations` (`allocation_id`, `tenant_id`, `wbs_id`, `employee_id`, `start_date`, `end_date`, `hours_assigned`, `duration_days`, `daily_rate`, `total_cost`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,3,4,'2024-02-02','2024-02-06',8.00,5,820.00,4100.00,'',1,1,'2025-11-29 11:03:31',1,'2025-11-29 11:03:31');
INSERT INTO `manpower_allocations` (`allocation_id`, `tenant_id`, `wbs_id`, `employee_id`, `start_date`, `end_date`, `hours_assigned`, `duration_days`, `daily_rate`, `total_cost`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,3,10,'2024-02-13','2024-02-29',8.00,17,500.00,8500.00,'',1,1,'2025-11-29 11:04:24',1,'2025-11-29 11:04:24');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_manpower_allocations_audit` AFTER INSERT ON `manpower_allocations` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'MANPOWER_ALLOCATIONS',
        NEW.allocation_id,
        'INSERT',
        JSON_OBJECT(
            'allocation_id', NEW.allocation_id,
            'wbs_id', NEW.wbs_id,
            'employee_id', NEW.employee_id,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'hours_assigned', NEW.hours_assigned,
            'total_cost', NEW.total_cost
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_manpower_allocations_audit_update` AFTER UPDATE ON `manpower_allocations` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'MANPOWER_ALLOCATIONS',
        NEW.allocation_id,
        'UPDATE',
        JSON_OBJECT(
            'allocation_id', OLD.allocation_id,
            'wbs_id', OLD.wbs_id,
            'employee_id', OLD.employee_id,
            'start_date', OLD.start_date,
            'end_date', OLD.end_date,
            'hours_assigned', OLD.hours_assigned,
            'total_cost', OLD.total_cost
        ),
        JSON_OBJECT(
            'allocation_id', NEW.allocation_id,
            'wbs_id', NEW.wbs_id,
            'employee_id', NEW.employee_id,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'hours_assigned', NEW.hours_assigned,
            'total_cost', NEW.total_cost
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `master_codes`
--

CREATE TABLE `master_codes` (
  `code_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `code_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code_value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `short_description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `long_description` text COLLATE utf8mb4_unicode_ci,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`code_id`),
  UNIQUE KEY `UQ_master_codes_tenant_type_value` (`tenant_id`,`code_type`,`code_value`),
  KEY `idx_master_codes_tenant_type` (`tenant_id`,`code_type`),
  KEY `idx_master_codes_tenant_type_active` (`tenant_id`,`code_type`,`activate_flag`),
  KEY `idx_master_codes_code_type` (`code_type`),
  KEY `idx_master_codes_created_by` (`created_by`),
  KEY `idx_master_codes_updated_by` (`updated_by`),
  CONSTRAINT `fk_master_codes_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `master_codes`
--

INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,'WORK_CENTER','WC_SITE','Site Work Center','Primary work center for site operations and field work activities.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,'WORK_CENTER','WC_FOUND','Foundation Work Center','Work center dedicated to foundation and structural work.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,'WORK_CENTER','WC_FINISH','Finishing Work Center','Work center for finishing activities including painting, flooring, fixtures.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,'COST_CENTER','CC_001','Cost Center 001','Primary cost center for general operations and administrative expenses.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,'COST_CENTER','CC_002','Cost Center 002','Secondary cost center for project-specific expenses.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,'COST_CENTER','CC_003','Cost Center 003','Cost center for maintenance and support activities.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,'COST_CENTER','CC_004','Cost Center 004','Cost center for research and development.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,'COST_CENTER','CC_005','Cost Center 005','Cost center for quality assurance and testing.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (9,1,'WBS_STATUS','NOT_STARTED','Not Started','Work breakdown structure item has been created but work has not yet begun.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10,1,'WBS_STATUS','IN_PROGRESS','In Progress','Work breakdown structure item is currently being worked on.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (11,1,'WBS_STATUS','COMPLETED','Completed','Work breakdown structure item has been finished and completed.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (12,1,'WBS_STATUS','ON_HOLD','On Hold','Work breakdown structure item is temporarily paused.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (13,1,'WBS_STATUS','CANCELLED','Cancelled','Work breakdown structure item has been cancelled.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (14,1,'SKILL_LEVEL','SKILLED','Skilled Worker','Skilled worker with specialized training, certification, or expertise.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (15,1,'SKILL_LEVEL','UNSKILLED','Unskilled Worker','Unskilled worker performing general labor tasks.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (16,1,'COUNTRY_CODE','+91','India','Country code for India. Used for phone number formatting.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (17,1,'COUNTRY_CODE','+1','USA/Canada','Country code for United States and Canada.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (18,1,'COUNTRY_CODE','+44','United Kingdom','Country code for United Kingdom.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (19,1,'COUNTRY_CODE','+971','UAE','Country code for United Arab Emirates.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (20,1,'CONTRACTOR','CONT001','ABC Construction Ltd','ABC Construction Ltd - Primary contractor for construction projects.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (21,1,'CONTRACTOR','CONT002','XYZ Builders Inc','XYZ Builders Inc - Specialized contractor for infrastructure projects.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (22,1,'CONTRACTOR','CONT003','Global Contractors Pvt Ltd','Global Contractors Pvt Ltd - Multi-service contractor.',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (23,1,'TASK_PRIORITY','HIGH','High Priority','High priority tasks that should be completed soon. Important for project success but not immediately blocking.',1,1,'2025-11-20 10:35:34',NULL,'2025-11-20 10:35:34');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (24,1,'TASK_PRIORITY','MEDIUM','Medium Priority','Standard priority tasks with normal scheduling. Completed as part of regular workflow.',1,1,'2025-11-20 10:35:34',NULL,'2025-11-20 10:35:34');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (25,1,'TASK_PRIORITY','LOW','Low Priority','Lower priority tasks that can be deferred if needed. Nice to have but not critical for immediate goals.',1,1,'2025-11-20 10:35:34',NULL,'2025-11-20 10:35:34');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (26,1,'PROJECT_TYPE','CONSTRUCTION','Construction Project','Construction and building projects including new builds, renovations, and infrastructure development.',1,1,'2025-11-20 10:35:34',NULL,'2025-11-20 10:35:34');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (27,1,'PROJECT_TYPE','MAINTENANCE','Maintenance Project','Maintenance and repair projects for existing facilities and infrastructure.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (28,1,'PROJECT_TYPE','RENOVATION','Renovation Project','Renovation and upgrade projects for existing structures and facilities.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (29,1,'PROJECT_TYPE','PLANNING','Planning Project','Planning and design projects including feasibility studies and design development.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (30,1,'RESOURCE_TYPE','LABOR','Labor Resource','Human resources including workers, technicians, and skilled labor. Tracks labor hours and costs.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (31,1,'RESOURCE_TYPE','EQUIPMENT','Equipment Resource','Equipment and machinery resources including tools, vehicles, and heavy machinery. Tracks equipment usage and rental costs.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (32,1,'RESOURCE_TYPE','MATERIAL','Material Resource','Material resources including raw materials, supplies, and consumables. Tracks material costs and inventory.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (33,1,'RESOURCE_TYPE','SERVICE','Service Resource','Service resources including subcontractors, consultants, and external services. Tracks service costs and contracts.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (34,1,'ALLOCATION_STATUS','PLANNED','Planned Allocation','Resource allocation that has been planned but not yet confirmed. Pending approval or scheduling.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (35,1,'ALLOCATION_STATUS','CONFIRMED','Confirmed Allocation','Resource allocation that has been confirmed and scheduled. Resources are committed to the allocation.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (36,1,'ALLOCATION_STATUS','ACTIVE','Active Allocation','Resource allocation that is currently active. Resources are being used for the allocated work.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (37,1,'ALLOCATION_STATUS','COMPLETED','Completed Allocation','Resource allocation that has been completed. Work is finished and resources are released.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (38,1,'ALLOCATION_STATUS','CANCELLED','Cancelled Allocation','Resource allocation that has been cancelled. Resources were not used or allocation was revoked.',1,1,'2025-11-20 10:35:35',NULL,'2025-11-20 10:35:35');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (66,1,'MATERIAL_TYPE','Cement','Cement bags','Cement in bags (typically 50kg per bag)',1,1,'2025-11-23 06:47:17',1,'2025-11-23 06:47:17');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (67,1,'MATERIAL_TYPE','Steel','Steel reinforcement','Steel reinforcement bars (rebar) in kg',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (68,1,'MATERIAL_TYPE','Sand','Sand','Fine aggregate sand in tons',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (69,1,'MATERIAL_TYPE','Aggregate','Coarse aggregate','Coarse aggregate (stone chips) in tons',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (70,1,'MATERIAL_TYPE','Bricks','Bricks','Clay bricks in numbers',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (72,2,'SKILL_LEVEL','SKILLED','Skilled Worker','Skilled worker with specialized training, certification, or expertise in specific trades or professions.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (74,2,'SKILL_LEVEL','UNSKILLED','Unskilled Worker','Unskilled worker performing general labor tasks that do not require specialized training or certification.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (76,2,'COUNTRY_CODE','+91','India','Country code for India. Used for phone number formatting.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (78,2,'COUNTRY_CODE','+1','USA/Canada','Country code for United States and Canada. Used for phone number formatting.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (80,2,'COUNTRY_CODE','+44','United Kingdom','Country code for United Kingdom. Used for phone number formatting.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (82,2,'COUNTRY_CODE','+971','UAE','Country code for United Arab Emirates. Used for phone number formatting.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (84,2,'CONTRACTOR','CONT001','ABC Construction Ltd','ABC Construction Ltd - Primary contractor for construction projects.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (86,2,'CONTRACTOR','CONT002','XYZ Builders Inc','XYZ Builders Inc - Specialized contractor for infrastructure projects.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (88,2,'CONTRACTOR','CONT003','Global Contractors Pvt Ltd','Global Contractors Pvt Ltd - Multi-service contractor for various project types.',1,1,'2025-11-28 18:08:43',NULL,'2025-11-28 18:08:43');
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (89,1,'UNIT','kg','Kilogram','Standard unit of mass in metric system. Used for measuring weight and mass.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (90,1,'UNIT','g','Gram','Smaller unit of mass in metric system. One thousand grams equals one kilogram.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (91,1,'UNIT','mg','Milligram','Very small unit of mass. One thousand milligrams equals one gram.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (92,1,'UNIT','ton','Metric Ton','Large unit of mass equal to 1000 kilograms. Used for heavy materials and bulk quantities.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (93,1,'UNIT','lb','Pound','Unit of mass in imperial system. Commonly used in US and UK measurements.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (94,1,'UNIT','m','Meter','Standard unit of length in metric system. Base unit for measuring distance.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (95,1,'UNIT','cm','Centimeter','Unit of length equal to one hundredth of a meter. Used for smaller measurements.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (96,1,'UNIT','mm','Millimeter','Very small unit of length. One thousand millimeters equals one meter.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (97,1,'UNIT','km','Kilometer','Large unit of length equal to 1000 meters. Used for long distances.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (98,1,'UNIT','ft','Foot','Unit of length in imperial system. Equal to 12 inches or approximately 0.3048 meters.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (99,1,'UNIT','in','Inch','Small unit of length in imperial system. Twelve inches equal one foot.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (100,1,'UNIT','L','Liter','Standard unit of volume in metric system. Used for measuring liquid capacity.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (101,1,'UNIT','mL','Milliliter','Small unit of volume. One thousand milliliters equals one liter.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (102,1,'UNIT','m³','Cubic Meter','Unit of volume in metric system. Used for measuring large volumes and bulk materials.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (103,1,'UNIT','ft³','Cubic Foot','Unit of volume in imperial system. Used for measuring volume in construction and materials.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (104,1,'UNIT','hours','Hours','Unit of time equal to 60 minutes. Used for measuring work duration and time-based tasks.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (105,1,'UNIT','days','Days','Unit of time equal to 24 hours. Used for measuring project duration and timelines.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (106,1,'UNIT','weeks','Weeks','Unit of time equal to 7 days. Used for longer duration measurements.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (107,1,'UNIT','months','Months','Unit of time approximately equal to 30 days. Used for project planning and scheduling.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (108,1,'UNIT','m²','Square Meter','Unit of area in metric system. Used for measuring surface area and floor space.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (109,1,'UNIT','ft²','Square Foot','Unit of area in imperial system. Used for measuring surface area in construction.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (110,1,'UNIT','acre','Acre','Unit of area commonly used for land measurement. Equal to approximately 4047 square meters.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (111,1,'UNIT','pcs','Pieces','Unit for counting individual items or pieces. Used for discrete quantity measurements.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (112,1,'UNIT','units','Units','Generic unit for counting items. Used when specific unit type is not applicable.',1,1,'2025-11-28 18:13:02',NULL,NULL);
INSERT INTO `master_codes` (`code_id`, `tenant_id`, `code_type`, `code_value`, `short_description`, `long_description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (113,1,'UNIT','nos','Numbers','Unit for counting items by number. Alternative to pieces for quantity measurement.',1,1,'2025-11-28 18:13:02',NULL,NULL);

--
-- Table structure for table `material_usage`
--

CREATE TABLE `material_usage` (
  `usage_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `wbs_id` bigint NOT NULL,
  `material_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty_used` decimal(18,2) NOT NULL,
  `usage_date` date NOT NULL,
  `remarks` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`usage_id`),
  KEY `FK_material_usage_wbs` (`wbs_id`),
  KEY `idx_material_usage_tenant_id` (`tenant_id`),
  KEY `idx_material_usage_wbs_id` (`tenant_id`,`wbs_id`),
  KEY `idx_material_usage_date` (`tenant_id`,`wbs_id`,`usage_date`),
  KEY `idx_material_usage_material` (`tenant_id`,`material_type`),
  KEY `idx_material_usage_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `FK_material_usage_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `FK_material_usage_wbs` FOREIGN KEY (`wbs_id`) REFERENCES `wbs` (`wbs_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `material_usage`
--

INSERT INTO `material_usage` (`usage_id`, `tenant_id`, `wbs_id`, `material_type`, `qty_used`, `usage_date`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,1,'Cement',120.00,'2025-11-07','Seeded cement usage for WBS',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `material_usage` (`usage_id`, `tenant_id`, `wbs_id`, `material_type`, `qty_used`, `usage_date`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,1,'Steel',450.00,'2025-11-08','Seeded steel usage for WBS',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `material_usage` (`usage_id`, `tenant_id`, `wbs_id`, `material_type`, `qty_used`, `usage_date`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,1,'Sand',3.50,'2025-11-09','Seeded sand usage for WBS',1,1,'2025-11-23 06:47:18',1,'2025-11-23 06:47:18');
INSERT INTO `material_usage` (`usage_id`, `tenant_id`, `wbs_id`, `material_type`, `qty_used`, `usage_date`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,8,'Cement',2.00,'2025-11-01',NULL,1,1,'2025-11-23 12:41:49',1,'2025-11-23 12:41:49');
INSERT INTO `material_usage` (`usage_id`, `tenant_id`, `wbs_id`, `material_type`, `qty_used`, `usage_date`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,8,'Steel',20.00,'2025-11-01',NULL,1,1,'2025-11-23 12:42:23',1,'2025-11-23 12:42:23');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_material_usage_audit` AFTER INSERT ON `material_usage` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'MATERIAL_USAGE',
        NEW.usage_id,
        'INSERT',
        JSON_OBJECT(
            'wbs_id', NEW.wbs_id,
            'material_type', NEW.material_type,
            'qty_used', NEW.qty_used,
            'usage_date', NEW.usage_date,
            'remarks', NEW.remarks
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_material_usage_audit_update` AFTER UPDATE ON `material_usage` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'MATERIAL_USAGE',
        NEW.usage_id,
        'UPDATE',
        JSON_OBJECT(
            'wbs_id', OLD.wbs_id,
            'material_type', OLD.material_type,
            'qty_used', OLD.qty_used,
            'usage_date', OLD.usage_date,
            'remarks', OLD.remarks
        ),
        JSON_OBJECT(
            'wbs_id', NEW.wbs_id,
            'material_type', NEW.material_type,
            'qty_used', NEW.qty_used,
            'usage_date', NEW.usage_date,
            'remarks', NEW.remarks
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `page_authorizations`
--

CREATE TABLE `page_authorizations` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `page_path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `page_name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `role_id` bigint DEFAULT NULL,
  `user_id` bigint DEFAULT NULL,
  `is_allowed` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_page_auth_role` (`role_id`,`page_path`),
  KEY `idx_page_auth_user` (`user_id`,`page_path`),
  CONSTRAINT `fk_page_auth_role` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_page_auth_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `page_authorizations`
--

INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (11,'/','Dashboard',NULL,2,1,'2025-11-26 17:43:01','2025-11-26 17:43:01');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (13,'/wbs/:wbsId/confirmations','Confirmations',NULL,2,1,'2025-11-26 17:43:01','2025-11-26 17:43:01');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (15,'/projects','Projects',NULL,2,1,'2025-11-26 17:43:01','2025-11-26 17:43:01');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (17,'/wbs/:wbsId/materials','Material Usage',NULL,2,1,'2025-11-26 17:43:01','2025-11-26 17:43:01');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (18,'/tasks/:taskId/plans','Plan Versions',NULL,2,1,'2025-11-26 17:43:01','2025-11-26 17:43:01');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (19,'/tasks/:taskId/updates','Task Updates',NULL,2,1,'2025-11-26 17:43:01','2025-11-26 17:43:01');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (20,'/wbs/:wbsId/tasks','Tasks',NULL,2,1,'2025-11-26 17:43:32','2025-11-26 17:43:32');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (21,'/wbs/:wbsId/resources','Resource Allocation',NULL,2,1,'2025-11-26 17:43:32','2025-11-26 17:43:32');
INSERT INTO `page_authorizations` (`id`, `page_path`, `page_name`, `role_id`, `user_id`, `is_allowed`, `created_at`, `updated_at`) VALUES (25,'/projects/:projectId/wbs','WBS Hierarchy',NULL,2,1,'2025-11-26 17:43:32','2025-11-26 17:43:32');

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `code` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `resource_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `action` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_permission_tenant_code` (`tenant_id`,`code`),
  CONSTRAINT `fk_permissions_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=20060 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--


INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (2,1,'USER_READ','Read User','Permission to read user information','USER','READ',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (3,1,'USER_UPDATE','Update User','Permission to update user information','USER','UPDATE',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (4,1,'USER_DELETE','Delete User','Permission to delete users','USER','DELETE',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (5,1,'ROLE_MANAGE','Manage Roles','Permission to manage roles','ROLE','MANAGE',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (6,1,'PERMISSION_MANAGE','Manage Permissions','Permission to manage permissions','PERMISSION','MANAGE',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (7,1,'PAGE_MASTER_DATA_VIEW','View Master Data','Permission to view and read master data codes. Required for accessing the Master Data management page and viewing master codes.','PAGE','VIEW',1,'2025-11-20 10:35:35','2025-11-20 10:35:35');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (8,1,'PAGE_MASTER_DATA_EDIT','Edit Master Data','Permission to create, update, and delete master data codes. Includes bulk upload capabilities. Required for write operations on master codes.','PAGE','EDIT',1,'2025-11-20 10:35:35','2025-11-20 10:35:35');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (9,1,'PAGE_BUSINESS_RULES_VIEW','View Business Rules','Permission to view and read business rules. Required for accessing the Business Rules management page and viewing rule configurations.','PAGE','VIEW',1,'2025-11-20 10:35:35','2025-11-20 10:35:35');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (10,1,'PAGE_BUSINESS_RULES_EDIT','Edit Business Rules','Permission to create, update, and delete business rules. Required for write operations on business rule configurations.','PAGE','EDIT',1,'2025-11-20 10:35:35','2025-11-20 10:35:35');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (11,1,'PAGE_PROJECTS_VIEW','View Projects','Permission to view and read projects, WBS, tasks, plans, and related data. Required for accessing the Projects module pages and viewing project information.','PAGE','VIEW',1,'2025-11-21 00:48:55','2025-11-21 00:48:55');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (12,1,'PAGE_PROJECTS_EDIT','Edit Projects','Permission to create, update, and delete projects, WBS, tasks, plans, task updates, and confirmations. Includes all write operations in the Projects module.','PAGE','EDIT',1,'2025-11-21 00:48:55','2025-11-21 00:48:55');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (13,1,'PROJECT_CREATE','Create Project','Permission to create new projects','PROJECT','CREATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (14,1,'PROJECT_READ','Read Project','Permission to read project information','PROJECT','READ',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (15,1,'PROJECT_UPDATE','Update Project','Permission to update project information','PROJECT','UPDATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (16,1,'PROJECT_DELETE','Delete Project','Permission to delete projects','PROJECT','DELETE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (17,1,'WBS_CREATE','Create WBS','Permission to create new WBS (Work Breakdown Structure)','WBS','CREATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (18,1,'WBS_READ','Read WBS','Permission to read WBS (Work Breakdown Structure) information','WBS','READ',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (19,1,'WBS_UPDATE','Update WBS','Permission to update WBS (Work Breakdown Structure) information','WBS','UPDATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20,1,'WBS_DELETE','Delete WBS','Permission to delete WBS (Work Breakdown Structure)','WBS','DELETE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (21,1,'TASK_CREATE','Create Task','Permission to create new tasks','TASK','CREATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (22,1,'TASK_READ','Read Task','Permission to read task information','TASK','READ',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (23,1,'TASK_UPDATE','Update Task','Permission to update task information','TASK','UPDATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (24,1,'TASK_DELETE','Delete Task','Permission to delete tasks','TASK','DELETE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (25,1,'PLAN_CREATE','Create Plan','Permission to create new plans','PLAN','CREATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (26,1,'PLAN_READ','Read Plan','Permission to read plan information','PLAN','READ',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (27,1,'PLAN_UPDATE','Update Plan','Permission to update plan information','PLAN','UPDATE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (28,1,'PLAN_DELETE','Delete Plan','Permission to delete plans','PLAN','DELETE',1,'2025-11-27 17:41:12','2025-11-27 17:41:12');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (10029,1,'PAGE_CONFIRMATION_VIEW','View Confirmations','Permission to view and read WBS confirmations, confirmation history, and summary data. Required for accessing the Confirmations page and viewing confirmation information.','PAGE','VIEW',1,'2025-11-29 12:39:09','2025-11-29 12:39:09');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (10030,1,'PAGE_CONFIRMATION_EDIT','Edit Confirmations','Permission to create and edit WBS confirmations. Allows users to confirm WBS progress with date ranges and manual quantities. Required for creating new confirmations.','PAGE','EDIT',1,'2025-11-29 12:39:09','2025-11-29 12:39:09');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (10031,1,'PAGE_CONFIRMATION_ADMIN','Admin Confirmations','Permission to undo or delete confirmations. This is an administrative permission that allows reversing confirmed WBS progress. Required for undoing confirmations.','PAGE','ADMIN',1,'2025-11-29 12:39:09','2025-11-29 12:39:09');

INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20030,3,'USER_READ','Read User','Permission to read user information','USER','READ',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20031,3,'USER_UPDATE','Update User','Permission to update user information','USER','UPDATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20032,3,'USER_DELETE','Delete User','Permission to delete users','USER','DELETE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20033,3,'ROLE_MANAGE','Manage Roles','Permission to manage roles','ROLE','MANAGE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20034,3,'PERMISSION_MANAGE','Manage Permissions','Permission to manage permissions','PERMISSION','MANAGE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20035,3,'PAGE_MASTER_DATA_VIEW','View Master Data','Permission to view and read master data codes. Required for accessing the Master Data management page and viewing master codes.','PAGE','VIEW',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20036,3,'PAGE_MASTER_DATA_EDIT','Edit Master Data','Permission to create, update, and delete master data codes. Includes bulk upload capabilities. Required for write operations on master codes.','PAGE','EDIT',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20037,3,'PAGE_BUSINESS_RULES_VIEW','View Business Rules','Permission to view and read business rules. Required for accessing the Business Rules management page and viewing rule configurations.','PAGE','VIEW',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20038,3,'PAGE_BUSINESS_RULES_EDIT','Edit Business Rules','Permission to create, update, and delete business rules. Required for write operations on business rule configurations.','PAGE','EDIT',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20039,3,'PAGE_PROJECTS_VIEW','View Projects','Permission to view and read projects, WBS, tasks, plans, and related data. Required for accessing the Projects module pages and viewing project information.','PAGE','VIEW',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20040,3,'PAGE_PROJECTS_EDIT','Edit Projects','Permission to create, update, and delete projects, WBS, tasks, plans, task updates, and confirmations. Includes all write operations in the Projects module.','PAGE','EDIT',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20041,3,'PROJECT_CREATE','Create Project','Permission to create new projects','PROJECT','CREATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20042,3,'PROJECT_READ','Read Project','Permission to read project information','PROJECT','READ',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20043,3,'PROJECT_UPDATE','Update Project','Permission to update project information','PROJECT','UPDATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20044,3,'PROJECT_DELETE','Delete Project','Permission to delete projects','PROJECT','DELETE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20045,3,'WBS_CREATE','Create WBS','Permission to create new WBS (Work Breakdown Structure)','WBS','CREATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20046,3,'WBS_READ','Read WBS','Permission to read WBS (Work Breakdown Structure) information','WBS','READ',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20047,3,'WBS_UPDATE','Update WBS','Permission to update WBS (Work Breakdown Structure) information','WBS','UPDATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20048,3,'WBS_DELETE','Delete WBS','Permission to delete WBS (Work Breakdown Structure)','WBS','DELETE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20049,3,'TASK_CREATE','Create Task','Permission to create new tasks','TASK','CREATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20050,3,'TASK_READ','Read Task','Permission to read task information','TASK','READ',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20051,3,'TASK_UPDATE','Update Task','Permission to update task information','TASK','UPDATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20052,3,'TASK_DELETE','Delete Task','Permission to delete tasks','TASK','DELETE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20053,3,'PLAN_CREATE','Create Plan','Permission to create new plans','PLAN','CREATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20054,3,'PLAN_READ','Read Plan','Permission to read plan information','PLAN','READ',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20055,3,'PLAN_UPDATE','Update Plan','Permission to update plan information','PLAN','UPDATE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20056,3,'PLAN_DELETE','Delete Plan','Permission to delete plans','PLAN','DELETE',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20057,3,'PAGE_CONFIRMATION_VIEW','View Confirmations','Permission to view and read WBS confirmations, confirmation history, and summary data. Required for accessing the Confirmations page and viewing confirmation information.','PAGE','VIEW',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20058,3,'PAGE_CONFIRMATION_EDIT','Edit Confirmations','Permission to create and edit WBS confirmations. Allows users to confirm WBS progress with date ranges and manual quantities. Required for creating new confirmations.','PAGE','EDIT',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');
INSERT INTO `permissions` (`id`, `tenant_id`, `code`, `name`, `description`, `resource_type`, `action`, `is_active`, `created_at`, `updated_at`) VALUES (20059,3,'PAGE_CONFIRMATION_ADMIN','Admin Confirmations','Permission to undo or delete confirmations. This is an administrative permission that allows reversing confirmed WBS progress. Required for undoing confirmations.','PAGE','ADMIN',1,'2025-11-30 19:01:27','2025-11-30 19:01:27');

--
-- Table structure for table `plan_lines`
--

CREATE TABLE `plan_lines` (
  `plan_line_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `plan_version_id` bigint NOT NULL,
  `task_id` bigint NOT NULL,
  `line_number` int NOT NULL,
  `work_date` date NOT NULL,
  `planned_qty` decimal(18,2) NOT NULL,
  `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`plan_line_id`),
  UNIQUE KEY `uk_plan_lines_version_date` (`plan_version_id`,`work_date`),
  KEY `fk_plan_lines_task` (`task_id`),
  KEY `idx_plan_lines_tenant_id` (`tenant_id`),
  KEY `idx_plan_lines_version_id` (`tenant_id`,`plan_version_id`),
  KEY `idx_plan_lines_task_id` (`tenant_id`,`task_id`),
  KEY `idx_plan_lines_version_work_date` (`plan_version_id`,`work_date`),
  CONSTRAINT `fk_plan_lines_task` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`task_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_plan_lines_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_plan_lines_version` FOREIGN KEY (`plan_version_id`) REFERENCES `plan_versions` (`plan_version_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=10154 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `plan_lines`
--

INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,1,5,1,'2025-11-05',10.00,'Day 1 excavation',1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,1,5,2,'2025-11-06',10.00,'Day 2 excavation',1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,1,5,3,'2025-11-07',10.00,NULL,1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,1,5,4,'2025-11-08',10.00,NULL,1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,1,5,5,'2025-11-09',10.00,NULL,1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,1,5,6,'2025-11-10',10.00,NULL,1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,1,5,7,'2025-11-11',10.00,NULL,1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,1,5,8,'2025-11-12',10.00,NULL,1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (9,1,1,5,9,'2025-11-13',10.00,NULL,1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10,1,1,5,10,'2025-11-14',10.00,NULL,1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (11,1,2,5,1,'2025-11-05',12.00,'Day 1 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (12,1,2,5,2,'2025-11-06',12.00,'Day 2 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (13,1,2,5,3,'2025-11-07',12.00,'Day 3 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (14,1,2,5,4,'2025-11-08',12.00,'Day 4 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (15,1,2,5,5,'2025-11-09',12.00,'Day 5 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (16,1,2,5,6,'2025-11-10',12.00,'Day 6 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (17,1,2,5,7,'2025-11-11',12.00,'Day 7 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (18,1,2,5,8,'2025-11-12',12.00,'Day 8 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (19,1,2,5,9,'2025-11-13',12.00,'Day 9 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (20,1,2,5,10,'2025-11-14',12.00,'Day 10 excavation - revised',1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (21,1,3,6,1,'2025-11-22',25.00,NULL,1,1,'2025-11-22 11:42:05',1,'2025-11-22 11:42:05');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (22,1,4,6,1,'2025-11-22',25.00,NULL,1,1,'2025-11-22 11:43:51',1,'2025-11-22 11:43:51');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (23,1,5,7,1,'2025-11-01',50.00,NULL,1,1,'2025-11-22 11:53:14',1,'2025-11-22 11:53:14');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (24,1,6,7,1,'2025-11-02',15.00,NULL,1,1,'2025-11-22 12:48:42',1,'2025-11-22 12:48:42');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (25,1,6,7,2,'2025-11-03',15.00,NULL,1,1,'2025-11-22 12:48:42',1,'2025-11-22 12:48:42');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (26,1,6,7,3,'2025-11-04',15.00,NULL,1,1,'2025-11-22 12:48:42',1,'2025-11-22 12:48:42');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (27,1,6,7,4,'2025-11-05',15.00,NULL,1,1,'2025-11-22 12:48:42',1,'2025-11-22 12:48:42');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (28,1,7,7,1,'2025-11-01',20.00,NULL,1,1,'2025-11-22 12:49:58',1,'2025-11-22 12:49:58');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (29,1,7,7,2,'2025-11-02',20.00,NULL,1,1,'2025-11-22 12:49:58',1,'2025-11-22 12:49:58');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (30,1,7,7,3,'2025-11-03',20.00,NULL,1,1,'2025-11-22 12:49:58',1,'2025-11-22 12:49:58');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (31,1,7,7,4,'2025-11-04',20.00,NULL,1,1,'2025-11-22 12:49:58',1,'2025-11-22 12:49:58');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (32,1,7,7,5,'2025-11-05',20.00,NULL,1,1,'2025-11-22 12:49:58',1,'2025-11-22 12:49:58');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (33,1,8,8,1,'2025-11-24',100.00,NULL,1,1,'2025-11-24 11:12:44',1,'2025-11-24 11:12:44');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10033,1,10008,3,1,'2024-02-01',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10034,1,10008,3,2,'2024-02-02',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10035,1,10008,3,3,'2024-02-03',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10036,1,10008,3,4,'2024-02-04',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10037,1,10008,3,5,'2024-02-05',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10038,1,10008,3,6,'2024-02-06',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10039,1,10008,3,7,'2024-02-07',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10040,1,10008,3,8,'2024-02-08',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10041,1,10008,3,9,'2024-02-09',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10042,1,10008,3,10,'2024-02-10',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10043,1,10008,3,11,'2024-02-11',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10044,1,10008,3,12,'2024-02-12',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10045,1,10008,3,13,'2024-02-13',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10046,1,10008,3,14,'2024-02-14',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10047,1,10008,3,15,'2024-02-15',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10048,1,10008,3,16,'2024-02-16',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10049,1,10008,3,17,'2024-02-17',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10050,1,10008,3,18,'2024-02-18',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10051,1,10008,3,19,'2024-02-19',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10052,1,10008,3,20,'2024-02-20',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10053,1,10008,3,21,'2024-02-21',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10054,1,10008,3,22,'2024-02-22',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10055,1,10008,3,23,'2024-02-23',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10056,1,10008,3,24,'2024-02-24',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10057,1,10008,3,25,'2024-02-25',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10058,1,10008,3,26,'2024-02-26',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10059,1,10008,3,27,'2024-02-27',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10060,1,10008,3,28,'2024-02-28',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10061,1,10008,3,29,'2024-02-29',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10062,1,10008,3,30,'2024-03-01',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10063,1,10008,3,31,'2024-03-02',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10064,1,10008,3,32,'2024-03-03',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10065,1,10008,3,33,'2024-03-04',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10066,1,10008,3,34,'2024-03-05',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10067,1,10008,3,35,'2024-03-06',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10068,1,10008,3,36,'2024-03-07',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10069,1,10008,3,37,'2024-03-08',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10070,1,10008,3,38,'2024-03-09',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10071,1,10008,3,39,'2024-03-10',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10072,1,10008,3,40,'2024-03-11',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10073,1,10008,3,41,'2024-03-12',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10074,1,10008,3,42,'2024-03-13',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10075,1,10008,3,43,'2024-03-14',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10076,1,10008,3,44,'2024-03-15',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10077,1,10008,3,45,'2024-03-16',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10078,1,10008,3,46,'2024-03-17',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10079,1,10008,3,47,'2024-03-18',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10080,1,10008,3,48,'2024-03-19',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10081,1,10008,3,49,'2024-03-20',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10082,1,10008,3,50,'2024-03-21',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10083,1,10008,3,51,'2024-03-22',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10084,1,10008,3,52,'2024-03-23',9.92,NULL,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10085,1,10008,3,53,'2024-03-24',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10086,1,10008,3,54,'2024-03-25',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10087,1,10008,3,55,'2024-03-26',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10088,1,10008,3,56,'2024-03-27',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10089,1,10008,3,57,'2024-03-28',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10090,1,10008,3,58,'2024-03-29',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10091,1,10008,3,59,'2024-03-30',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10092,1,10008,3,60,'2024-03-31',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10093,1,10008,3,61,'2024-04-01',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10094,1,10008,3,62,'2024-04-02',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10095,1,10008,3,63,'2024-04-03',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10096,1,10008,3,64,'2024-04-04',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10097,1,10008,3,65,'2024-04-05',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10098,1,10008,3,66,'2024-04-06',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10099,1,10008,3,67,'2024-04-07',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10100,1,10008,3,68,'2024-04-08',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10101,1,10008,3,69,'2024-04-09',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10102,1,10008,3,70,'2024-04-10',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10103,1,10008,3,71,'2024-04-11',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10104,1,10008,3,72,'2024-04-12',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10105,1,10008,3,73,'2024-04-13',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10106,1,10008,3,74,'2024-04-14',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10107,1,10008,3,75,'2024-04-15',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10108,1,10008,3,76,'2024-04-16',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10109,1,10008,3,77,'2024-04-17',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10110,1,10008,3,78,'2024-04-18',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10111,1,10008,3,79,'2024-04-19',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10112,1,10008,3,80,'2024-04-20',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10113,1,10008,3,81,'2024-04-21',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10114,1,10008,3,82,'2024-04-22',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10115,1,10008,3,83,'2024-04-23',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10116,1,10008,3,84,'2024-04-24',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10117,1,10008,3,85,'2024-04-25',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10118,1,10008,3,86,'2024-04-26',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10119,1,10008,3,87,'2024-04-27',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10120,1,10008,3,88,'2024-04-28',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10121,1,10008,3,89,'2024-04-29',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10122,1,10008,3,90,'2024-04-30',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10123,1,10008,3,91,'2024-05-01',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10124,1,10008,3,92,'2024-05-02',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10125,1,10008,3,93,'2024-05-03',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10126,1,10008,3,94,'2024-05-04',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10127,1,10008,3,95,'2024-05-05',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10128,1,10008,3,96,'2024-05-06',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10129,1,10008,3,97,'2024-05-07',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10130,1,10008,3,98,'2024-05-08',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10131,1,10008,3,99,'2024-05-09',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10132,1,10008,3,100,'2024-05-10',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10133,1,10008,3,101,'2024-05-11',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10134,1,10008,3,102,'2024-05-12',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10135,1,10008,3,103,'2024-05-13',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10136,1,10008,3,104,'2024-05-14',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10137,1,10008,3,105,'2024-05-15',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10138,1,10008,3,106,'2024-05-16',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10139,1,10008,3,107,'2024-05-17',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10140,1,10008,3,108,'2024-05-18',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10141,1,10008,3,109,'2024-05-19',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10142,1,10008,3,110,'2024-05-20',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10143,1,10008,3,111,'2024-05-21',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10144,1,10008,3,112,'2024-05-22',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10145,1,10008,3,113,'2024-05-23',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10146,1,10008,3,114,'2024-05-24',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10147,1,10008,3,115,'2024-05-25',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10148,1,10008,3,116,'2024-05-26',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10149,1,10008,3,117,'2024-05-27',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10150,1,10008,3,118,'2024-05-28',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10151,1,10008,3,119,'2024-05-29',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10152,1,10008,3,120,'2024-05-30',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');
INSERT INTO `plan_lines` (`plan_line_id`, `tenant_id`, `plan_version_id`, `task_id`, `line_number`, `work_date`, `planned_qty`, `description`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10153,1,10008,3,121,'2024-05-31',9.92,NULL,1,1,'2025-11-28 15:54:34',1,'2025-11-28 15:54:34');

--
-- Table structure for table `plan_versions`
--

CREATE TABLE `plan_versions` (
  `plan_version_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `task_id` bigint NOT NULL,
  `version_no` int NOT NULL,
  `version_date` date NOT NULL,
  `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '0',
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`plan_version_id`),
  UNIQUE KEY `uk_plan_versions_task_version` (`task_id`,`version_no`),
  KEY `idx_plan_versions_tenant_id` (`tenant_id`),
  KEY `idx_plan_versions_tenant_task_version` (`tenant_id`,`task_id`,`version_no`),
  KEY `idx_plan_versions_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_plan_versions_task` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`task_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_plan_versions_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=10009 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `plan_versions`
--

INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,5,1,'2025-11-05','Initial plan version - 10 cubic meters per day',1,1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,5,2,'2025-11-05','Revised plan version - 12 cubic meters per day',0,1,1,'2025-11-21 00:48:55',NULL,'2025-11-21 00:48:55');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,6,1,'2025-11-22',NULL,0,1,1,'2025-11-22 11:42:05',1,'2025-11-22 11:43:51');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,6,2,'2025-11-22',NULL,1,1,1,'2025-11-22 11:43:51',1,'2025-11-22 11:43:51');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,7,1,'2025-11-22',NULL,0,1,1,'2025-11-22 11:53:14',1,'2025-11-22 12:48:42');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,7,2,'2025-11-22',NULL,0,1,1,'2025-11-22 12:48:42',1,'2025-11-22 12:49:58');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,7,3,'2025-11-22',NULL,1,1,1,'2025-11-22 12:49:58',1,'2025-11-22 12:49:58');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,8,1,'2025-11-24','Locking testing',1,1,1,'2025-11-24 11:12:44',1,'2025-11-24 11:12:44');
INSERT INTO `plan_versions` (`plan_version_id`, `tenant_id`, `task_id`, `version_no`, `version_date`, `description`, `is_active`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10008,1,3,1,'2025-11-28',NULL,1,1,1,'2025-11-28 15:54:33',1,'2025-11-28 15:54:33');

--
-- Table structure for table `projects`
--

CREATE TABLE `projects` (
  `project_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `project_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `project_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`project_id`),
  UNIQUE KEY `UQ_projects_tenant_code` (`tenant_id`,`project_code`),
  KEY `idx_projects_tenant_id` (`tenant_id`),
  KEY `idx_projects_tenant_code` (`tenant_id`,`project_code`),
  KEY `idx_projects_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_projects_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=10007 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,'PROJ001','Sample Construction Project','Sample project for testing Projects → WBS → Tasks module','2024-01-01','2024-12-31','ACTIVE',1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,'PROJ002','Software Development Project','Sample software development project','2024-02-01','2024-11-30','ACTIVE',1,1,'2025-11-20 10:35:37',1,'2025-11-21 12:48:41');
INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,'TESTPRJ010','test project836u nv 4n5in5nv 45 y fynu5yng4ngn gy 4nyg g4nybyb 4y nyb bb4iyniyio57j b   iun536inib 6 3iniuni653i ','Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \"Lorem ipsum dolor sit amet..\", comes from a line in section 1.10.32.\n\nThe standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et Malorum\" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.\n\nWhere can I get some?\nThere are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.\n\n5\n	paragraphs\n	words\n	bytes\n	lists\n	Start with \'Lorem\nipsum dolor sit amet...\'\n','2025-11-21','2025-12-21','INACTIVE',0,1,'2025-11-21 12:33:20',1,'2025-11-22 11:58:44');
INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,'PROJECT 3040 UUYEQBEW132 VUQVEFUYB24 4Q4GRG3GT ','634784','',NULL,NULL,'INACTIVE',1,1,'2025-11-21 12:40:41',1,'2025-11-22 11:58:37');
INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,'PROJ0002','Checking resource allocation','','2025-11-01','2025-11-30','ACTIVE',1,1,'2025-11-22 11:49:40',1,'2025-11-22 11:49:40');
INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,'TESTPROJ001','Testing completion - 26/11','Testing - 26/11','2025-11-01','2025-11-30','ACTIVE',0,1,'2025-11-24 10:41:30',1,'2025-11-26 11:28:03');
INSERT INTO `projects` (`project_id`, `tenant_id`, `project_code`, `project_name`, `description`, `start_date`, `end_date`, `status`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10006,1,'3643HFCHDH','234567','987654321`','2025-11-05','2025-11-19','ACTIVE',1,1,'2025-11-26 11:36:38',1,'2025-11-26 11:46:30');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_projects_audit` AFTER INSERT ON `projects` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'projects',
        NEW.project_id,
        'INSERT',
        JSON_OBJECT(
            'project_code', NEW.project_code,
            'project_name', NEW.project_name,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'status', NEW.status,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_projects_audit_update` AFTER UPDATE ON `projects` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'projects',
        NEW.project_id,
        'UPDATE',
        JSON_OBJECT(
            'project_code', OLD.project_code,
            'project_name', OLD.project_name,
            'start_date', OLD.start_date,
            'end_date', OLD.end_date,
            'status', OLD.status,
            'activate_flag', OLD.activate_flag
        ),
        JSON_OBJECT(
            'project_code', NEW.project_code,
            'project_name', NEW.project_name,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'status', NEW.status,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_projects_audit_delete` AFTER DELETE ON `projects` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `changed_by`, `changed_on`)
    VALUES (
        OLD.tenant_id,
        'projects',
        OLD.project_id,
        'DELETE',
        JSON_OBJECT(
            'project_code', OLD.project_code,
            'project_name', OLD.project_name,
            'start_date', OLD.start_date,
            'end_date', OLD.end_date,
            'status', OLD.status,
            'activate_flag', OLD.activate_flag
        ),
        COALESCE(OLD.updated_by, OLD.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `role_permissions`
--

CREATE TABLE `role_permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `role_id` bigint NOT NULL,
  `permission_id` bigint NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_role_permission_unique` (`role_id`,`permission_id`),
  KEY `fk_role_permissions_permission` (`permission_id`),
  CONSTRAINT `fk_role_permissions_permission` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_role_permissions_role` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10128 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_permissions`
--

INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (1,1,6,'2025-12-01 03:10:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (2,1,5,'2025-12-01 03:10:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (3,1,1,'2025-12-01 03:10:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (4,1,4,'2025-12-01 03:10:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (5,1,2,'2025-12-01 03:10:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (6,1,3,'2025-12-01 03:10:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10,3,2,'2025-11-20 10:35:34');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (11,1,7,'2025-11-20 10:35:35');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (12,1,8,'2025-11-20 10:35:35');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (13,1,9,'2025-11-20 10:35:35');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (14,1,10,'2025-11-20 10:35:35');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (15,1,11,'2025-11-21 00:48:55');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (16,1,12,'2025-11-21 00:48:55');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (30,4,2,'2025-11-26 16:34:04');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (31,4,7,'2025-11-26 16:34:05');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (32,4,11,'2025-11-26 16:34:05');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (36,1,25,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (37,1,28,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (38,1,26,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (39,1,27,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (40,1,13,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (41,1,16,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (42,1,14,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (43,1,15,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (44,1,21,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (45,1,24,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (46,1,22,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (47,1,23,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (48,1,17,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (49,1,20,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (50,1,18,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (51,1,19,'2025-11-27 17:41:12');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (59,6,2,'2025-11-27 17:50:00');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (60,6,18,'2025-11-27 17:50:00');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (61,6,22,'2025-11-27 17:50:00');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (62,6,7,'2025-11-27 17:50:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (63,6,9,'2025-11-27 17:50:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (64,6,26,'2025-11-27 17:50:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (65,6,14,'2025-11-27 17:50:01');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (66,1,10029,'2025-11-29 12:39:09');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (67,1,10030,'2025-11-29 12:39:09');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (68,1,10031,'2025-11-29 12:39:09');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10066,8,20032,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10067,8,20033,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10068,8,20034,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10069,8,20035,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10070,8,20036,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10071,8,20037,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10072,8,20038,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10073,8,20039,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10074,8,20040,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10075,8,20041,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10076,8,20042,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10077,8,20043,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10078,8,20044,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10079,8,20045,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10080,8,20046,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10081,8,20047,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10082,8,20048,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10083,8,20049,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10084,8,20050,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10085,8,20051,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10086,8,20052,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10087,8,20053,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10088,8,20054,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10089,8,20055,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10090,8,20056,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10091,8,20057,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10092,8,20058,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10093,8,20059,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10094,8,20029,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10095,8,20030,'2025-11-30 19:02:37');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10096,8,20031,'2025-11-30 19:02:38');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10097,2,1,'2025-12-01 01:09:15');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10098,2,2,'2025-12-01 01:09:15');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10099,2,3,'2025-12-01 01:09:15');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10100,2,4,'2025-12-01 01:09:15');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10101,2,5,'2025-12-01 01:09:15');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10102,2,6,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10103,2,7,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10104,2,8,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10105,2,9,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10106,2,10,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10107,2,11,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10108,2,12,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10109,2,13,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10110,2,14,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10111,2,15,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10112,2,16,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10113,2,17,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10114,2,18,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10115,2,19,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10116,2,20,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10117,2,21,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10118,2,22,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10119,2,23,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10120,2,24,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10121,2,25,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10122,2,26,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10123,2,27,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10124,2,28,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10125,2,10029,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10126,2,10030,'2025-12-01 01:09:16');
INSERT INTO `role_permissions` (`id`, `role_id`, `permission_id`, `created_at`) VALUES (10127,2,10031,'2025-12-01 01:09:16');

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_role_tenant_code` (`tenant_id`,`code`),
  CONSTRAINT `fk_roles_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (1,1,'SYSTEM_ADMIN','System Administrator','Full system access with all permissions',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (2,1,'SUPERVISOR','Supervisor','Supervisor role with management permissions',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (3,1,'END_USER','End User','Standard end user with limited permissions',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (4,1,'user_siddharth','Abhayanand Siddharth','',1,'2025-11-26 16:31:55','2025-11-26 16:31:55');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (5,1,'SiteSup','Site supervisor','Site supervisor',1,'2025-11-27 11:51:17','2025-11-27 11:51:17');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (6,1,'Raaj Mirstri','Raaj Mistri','Cloned from Abhayanand Siddharth',1,'2025-11-27 12:23:52','2025-11-27 12:23:52');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (7,2,'Supervisor','Supervisor','',1,'2025-11-28 10:47:18','2025-11-28 10:47:18');
INSERT INTO `roles` (`id`, `tenant_id`, `code`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES (8,3,'supervisor','Supervisor','',1,'2025-11-30 17:46:33','2025-11-30 17:46:33');

--
-- Table structure for table `system_settings`
--

CREATE TABLE `system_settings` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint DEFAULT NULL,
  `setting_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `setting_value` text COLLATE utf8mb4_unicode_ci,
  `description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_system_settings_tenant_key` (`tenant_id`,`setting_key`),
  KEY `idx_system_settings_tenant_key` (`tenant_id`,`setting_key`),
  KEY `idx_system_settings_key` (`setting_key`),
  CONSTRAINT `FK_system_settings_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `system_settings`
--


--
-- Table structure for table `task_updates`
--

CREATE TABLE `task_updates` (
  `update_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `task_id` bigint NOT NULL,
  `update_date` date NOT NULL,
  `planned_qty` decimal(18,2) DEFAULT NULL,
  `actual_qty` decimal(18,2) NOT NULL DEFAULT '0.00',
  `daily_update_qty` decimal(18,2) DEFAULT NULL,
  `remarks` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`update_id`),
  UNIQUE KEY `UQ_task_updates_tenant_task_date` (`tenant_id`,`task_id`,`update_date`),
  KEY `fk_task_updates_task` (`task_id`),
  KEY `idx_task_updates_tenant_id` (`tenant_id`),
  KEY `idx_task_updates_task_id` (`tenant_id`,`task_id`),
  KEY `idx_task_updates_date` (`tenant_id`,`task_id`,`update_date`),
  KEY `idx_task_updates_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_task_updates_task` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`task_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_task_updates_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=10017 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `task_updates`
--

INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,6,'2025-11-22',25.00,12.00,12.00,NULL,1,1,'2025-11-22 11:46:38',1,'2025-11-22 11:46:38');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,7,'2025-11-01',20.00,10.00,0.00,NULL,1,1,'2025-11-22 11:55:39',1,'2025-11-22 12:50:15');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,7,'2025-11-02',20.00,10.00,0.00,NULL,1,1,'2025-11-22 12:50:15',1,'2025-11-22 12:51:13');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,7,'2025-11-03',20.00,10.00,0.00,NULL,1,1,'2025-11-22 12:51:13',1,'2025-11-22 13:29:39');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,7,'2025-11-04',20.00,11.00,0.00,NULL,1,1,'2025-11-22 13:29:39',1,'2025-11-22 13:29:52');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,7,'2025-11-05',20.00,20.00,20.00,NULL,1,1,'2025-11-22 13:29:52',1,'2025-11-22 13:29:52');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,8,'2025-11-24',100.00,50.00,0.00,NULL,1,1,'2025-11-24 11:13:54',1,'2025-11-24 11:19:18');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10007,1,3,'2024-02-01',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10008,1,3,'2024-02-02',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10009,1,3,'2024-02-03',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10010,1,3,'2024-02-04',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10011,1,3,'2024-02-05',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10012,1,3,'2024-02-06',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10013,1,3,'2024-02-07',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:19',1,'2025-11-29 10:31:19');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10014,1,3,'2024-02-08',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:20',1,'2025-11-29 10:31:20');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10015,1,3,'2024-02-09',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:20',1,'2025-11-29 10:31:20');
INSERT INTO `task_updates` (`update_id`, `tenant_id`, `task_id`, `update_date`, `planned_qty`, `actual_qty`, `daily_update_qty`, `remarks`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10016,1,3,'2024-02-10',9.92,9.00,9.00,NULL,1,1,'2025-11-29 10:31:20',1,'2025-11-29 10:31:20');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_task_updates_audit` AFTER INSERT ON `task_updates` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'task_updates',
        NEW.update_id,
        'INSERT',
        JSON_OBJECT(
            'task_id', NEW.task_id,
            'update_date', NEW.update_date,
            'actual_qty', NEW.actual_qty,
            'daily_update_qty', NEW.daily_update_qty
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_task_updates_audit_update` AFTER UPDATE ON `task_updates` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'task_updates',
        NEW.update_id,
        'UPDATE',
        JSON_OBJECT(
            'task_id', OLD.task_id,
            'update_date', OLD.update_date,
            'actual_qty', OLD.actual_qty,
            'daily_update_qty', OLD.daily_update_qty
        ),
        JSON_OBJECT(
            'task_id', NEW.task_id,
            'update_date', NEW.update_date,
            'actual_qty', NEW.actual_qty,
            'daily_update_qty', NEW.daily_update_qty
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `task_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `project_id` bigint NOT NULL,
  `wbs_id` bigint NOT NULL,
  `task_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `task_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `planned_qty` decimal(18,2) DEFAULT NULL,
  `actual_qty` decimal(18,2) NOT NULL DEFAULT '0.00',
  `unit` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_confirmed` tinyint(1) NOT NULL DEFAULT '0',
  `confirmed_on` datetime DEFAULT NULL,
  `confirmed_by` bigint DEFAULT NULL,
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `lock_date` date DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`task_id`),
  UNIQUE KEY `UQ_tasks_tenant_code` (`tenant_id`,`task_code`),
  KEY `fk_tasks_project` (`project_id`),
  KEY `fk_tasks_wbs` (`wbs_id`),
  KEY `idx_tasks_tenant_id` (`tenant_id`),
  KEY `idx_tasks_wbs_id` (`tenant_id`,`wbs_id`),
  KEY `idx_tasks_tenant_code` (`tenant_id`,`task_code`),
  KEY `idx_tasks_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_tasks_project` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_tasks_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_tasks_wbs` FOREIGN KEY (`wbs_id`) REFERENCES `wbs` (`wbs_id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,1,1,'TASK001','Site Preparation','Prepare site for excavation','2024-01-01','2024-01-15',100.00,0.00,'DAYS','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,1,2,'TASK002','Excavation Work','Perform excavation','2024-01-16','2024-02-28',400.00,0.00,'DAYS','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-20 10:35:37',NULL,'2025-11-20 10:35:37');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,2,3,'TASK003','Backend Development','Develop backend APIs','2024-02-01','2024-05-31',1200.00,90.00,'HOURS','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-20 10:35:37',NULL,'2025-11-29 10:31:20');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,2,3,'TASK004','Frontend Development','Develop frontend UI','2024-03-01','2024-08-31',800.00,0.00,'HOURS','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-20 10:35:37',NULL,'2025-11-20 10:35:37');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,1,2,'TASK_EXCAVATION_A','Excavation Zone A / Trench Digging','Excavation work for Zone A including trench digging','2025-11-05','2025-11-14',100.00,0.00,'CUBIC_METERS','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-21 00:48:54',NULL,'2025-11-21 00:48:54');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,4,5,'TESTTASK0001','Checking manpower & resource allocation','','2025-11-22','2025-11-24',52.00,12.00,'kg','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-22 11:41:15',1,'2025-11-22 11:46:38');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,5,8,'TASK0003','checking resource allocation','','2025-11-01','2025-11-05',100.00,61.00,'kg','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-22 11:51:06',1,'2025-11-22 13:29:53');
INSERT INTO `tasks` (`task_id`, `tenant_id`, `project_id`, `wbs_id`, `task_code`, `task_name`, `description`, `start_date`, `end_date`, `planned_qty`, `actual_qty`, `unit`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,6,10,'TESTLOCKING','Testing locking functionalities','Testing locking on 24/11','2025-11-24','2025-11-30',100.00,50.00,'kg','PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-24 11:11:56',1,'2025-11-24 11:13:55');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_tasks_audit` AFTER INSERT ON `tasks` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'tasks',
        NEW.task_id,
        'INSERT',
        JSON_OBJECT(
            'task_code', NEW.task_code,
            'task_name', NEW.task_name,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'planned_qty', NEW.planned_qty,
            'status', NEW.status,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_tasks_audit_update` AFTER UPDATE ON `tasks` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'tasks',
        NEW.task_id,
        'UPDATE',
        JSON_OBJECT(
            'task_code', OLD.task_code,
            'task_name', OLD.task_name,
            'start_date', OLD.start_date,
            'end_date', OLD.end_date,
            'planned_qty', OLD.planned_qty,
            'status', OLD.status,
            'activate_flag', OLD.activate_flag
        ),
        JSON_OBJECT(
            'task_code', NEW.task_code,
            'task_name', NEW.task_name,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'planned_qty', NEW.planned_qty,
            'status', NEW.status,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Table structure for table `tenants`
--

CREATE TABLE `tenants` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `client_code` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `tenant_code` (`tenant_code`),
  KEY `idx_tenant_code` (`tenant_code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenants`
--

INSERT INTO `tenants` (`id`, `tenant_code`, `name`, `client_code`, `is_active`, `created_at`, `updated_at`) VALUES (1,'DEFAULT','Default Tenant','CLIENT001',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `tenants` (`id`, `tenant_code`, `name`, `client_code`, `is_active`, `created_at`, `updated_at`) VALUES (2,'TENANT02','Sample Tenant 2','CLIENT002',1,'2025-12-01 03:10:01','2025-12-01 03:10:01');
INSERT INTO `tenants` (`id`, `tenant_code`, `name`, `client_code`, `is_active`, `created_at`, `updated_at`) VALUES (3,'Elina','Elina','',0,'2025-11-30 17:26:12','2025-12-01 01:28:49');

--
-- Table structure for table `user_authorizations`
--

CREATE TABLE `user_authorizations` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `resource_type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `resource_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `permission_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_allowed` tinyint(1) NOT NULL DEFAULT '1',
  `conditions` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_user_auth_resource` (`user_id`,`resource_type`,`resource_id`),
  CONSTRAINT `fk_user_auth_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_authorizations`
--

INSERT INTO `user_authorizations` (`id`, `user_id`, `resource_type`, `resource_id`, `permission_type`, `is_allowed`, `conditions`, `created_at`, `updated_at`) VALUES (1,1,'WORK_CENTER','WC001','FULL',1,NULL,'2025-11-21 00:48:55','2025-11-21 00:48:55');
INSERT INTO `user_authorizations` (`id`, `user_id`, `resource_type`, `resource_id`, `permission_type`, `is_allowed`, `conditions`, `created_at`, `updated_at`) VALUES (2,1,'WORK_CENTER','WC002','FULL',1,NULL,'2025-11-21 00:48:55','2025-11-21 00:48:55');
INSERT INTO `user_authorizations` (`id`, `user_id`, `resource_type`, `resource_id`, `permission_type`, `is_allowed`, `conditions`, `created_at`, `updated_at`) VALUES (3,1,'COST_CENTER','CC001','FULL',1,NULL,'2025-11-21 00:48:55','2025-11-21 00:48:55');
INSERT INTO `user_authorizations` (`id`, `user_id`, `resource_type`, `resource_id`, `permission_type`, `is_allowed`, `conditions`, `created_at`, `updated_at`) VALUES (4,1,'COST_CENTER','CC002','FULL',1,NULL,'2025-11-21 00:48:55','2025-11-21 00:48:55');

--
-- Table structure for table `user_permissions`
--

CREATE TABLE `user_permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `permission_id` bigint NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_user_permission_unique` (`user_id`,`permission_id`),
  KEY `fk_user_permissions_permission` (`permission_id`),
  CONSTRAINT `fk_user_permissions_permission` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_user_permissions_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_permissions`
--

INSERT INTO `user_permissions` (`id`, `user_id`, `permission_id`, `created_at`) VALUES (1,2,11,'2025-11-26 17:43:01');

--
-- Table structure for table `user_roles`
--

CREATE TABLE `user_roles` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `role_id` bigint NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_user_role_unique` (`user_id`,`role_id`),
  KEY `fk_user_roles_role` (`role_id`),
  CONSTRAINT `fk_user_roles_role` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_user_roles_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_roles`
--

INSERT INTO `user_roles` (`id`, `user_id`, `role_id`, `created_at`) VALUES (1,1,1,'2025-12-01 03:10:01');
INSERT INTO `user_roles` (`id`, `user_id`, `role_id`, `created_at`) VALUES (4,3,8,'2025-11-30 19:04:10');
INSERT INTO `user_roles` (`id`, `user_id`, `role_id`, `created_at`) VALUES (5,2,2,'2025-12-01 01:12:26');

--
-- Temporary view structure for view `vw_project_summary`
--

/*!50001 DROP VIEW IF EXISTS `vw_project_summary`*/;
/*!50001 CREATE VIEW `vw_project_summary` AS SELECT 
 1 AS `project_id`,
 1 AS `project_code`,
 1 AS `project_name`,
 1 AS `start_date`,
 1 AS `end_date`,
 1 AS `tenant_id`,
 1 AS `total_wbs_count`,
 1 AS `completed_wbs_count`,
 1 AS `in_progress_wbs_count`,
 1 AS `planned_wbs_count`,
 1 AS `total_planned_qty`,
 1 AS `total_actual_qty`*/;

--
-- Temporary view structure for view `vw_task_performance`
--

/*!50001 DROP VIEW IF EXISTS `vw_task_performance`*/;
/*!50001 CREATE VIEW `vw_task_performance` AS SELECT 
 1 AS `task_id`,
 1 AS `task_code`,
 1 AS `task_name`,
 1 AS `wbs_id`,
 1 AS `wbs_code`,
 1 AS `wbs_name`,
 1 AS `planned_qty`,
 1 AS `total_actual_qty`,
 1 AS `variance`,
 1 AS `completion_percentage`,
 1 AS `tenant_id`*/;

--
-- Temporary view structure for view `vw_wbs_progress`
--

/*!50001 DROP VIEW IF EXISTS `vw_wbs_progress`*/;
/*!50001 CREATE VIEW `vw_wbs_progress` AS SELECT 
 1 AS `wbs_id`,
 1 AS `wbs_code`,
 1 AS `wbs_name`,
 1 AS `project_id`,
 1 AS `project_code`,
 1 AS `project_name`,
 1 AS `start_date`,
 1 AS `end_date`,
 1 AS `planned_qty`,
 1 AS `actual_qty`,
 1 AS `status`,
 1 AS `is_confirmed`,
 1 AS `is_locked`,
 1 AS `lock_date`,
 1 AS `tenant_id`,
 1 AS `completion_percentage`,
 1 AS `variance`*/;

--
-- Table structure for table `wbs`
--

CREATE TABLE `wbs` (
  `wbs_id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` bigint NOT NULL,
  `project_id` bigint NOT NULL,
  `parent_wbs_id` bigint DEFAULT NULL,
  `wbs_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `wbs_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `level` int NOT NULL DEFAULT '1',
  `work_center` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cost_center` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `planned_qty` decimal(18,2) DEFAULT NULL,
  `actual_qty` decimal(18,2) NOT NULL DEFAULT '0.00',
  `status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_confirmed` tinyint(1) NOT NULL DEFAULT '0',
  `confirmed_on` datetime DEFAULT NULL,
  `confirmed_by` bigint DEFAULT NULL,
  `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  `lock_date` date DEFAULT NULL,
  `activate_flag` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` bigint DEFAULT NULL,
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_by` bigint DEFAULT NULL,
  `updated_on` datetime DEFAULT NULL,
  PRIMARY KEY (`wbs_id`),
  UNIQUE KEY `UQ_wbs_tenant_code` (`tenant_id`,`wbs_code`),
  KEY `fk_wbs_project` (`project_id`),
  KEY `fk_wbs_parent` (`parent_wbs_id`),
  KEY `idx_wbs_tenant_id` (`tenant_id`),
  KEY `idx_wbs_project_id` (`tenant_id`,`project_id`),
  KEY `idx_wbs_parent_id` (`tenant_id`,`parent_wbs_id`),
  KEY `idx_wbs_tenant_code` (`tenant_id`,`wbs_code`),
  KEY `idx_wbs_tenant_active` (`tenant_id`,`activate_flag`),
  CONSTRAINT `fk_wbs_parent` FOREIGN KEY (`parent_wbs_id`) REFERENCES `wbs` (`wbs_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_wbs_project` FOREIGN KEY (`project_id`) REFERENCES `projects` (`project_id`) ON DELETE RESTRICT,
  CONSTRAINT `fk_wbs_tenant` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=10010 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `wbs`
--

INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (1,1,1,NULL,'WBS001','Foundation Work','Root WBS for foundation activities','2024-01-01','2024-03-31',1,'WC001','CC001',1000.00,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-12-01 03:10:01',NULL,'2025-12-01 03:10:01');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (2,1,1,NULL,'WBS009','Software Development','','2024-01-01','2024-01-31',1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-30 22:09:32',1,'2025-11-30 22:09:32');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (3,1,2,NULL,'WBS003','Development Phase','Root WBS for development','2024-02-01','2024-08-31',1,'WC002','CC002',2000.00,0.00,'PLANNED',0,NULL,NULL,1,'2024-02-05',1,1,'2025-11-20 10:35:37',NULL,'2025-11-29 13:01:43');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (4,1,4,NULL,'TEST_WBS ','project_delete','to see changes in wbs after deleteing the project',NULL,NULL,1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,0,1,'2025-11-21 12:50:05',1,'2025-11-21 12:50:50');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (5,1,4,NULL,'WBS006','test wbs','testing the wbs child',NULL,NULL,1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-21 12:54:00',1,'2025-11-21 12:54:00');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (6,1,4,5,'WBS0061','jr test wbs','I am testing child of test wbs',NULL,NULL,2,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-21 12:55:03',1,'2025-11-21 12:55:03');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (7,1,4,5,'WBS0062','child testing','testing child ',NULL,NULL,2,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-21 12:57:01',1,'2025-11-21 12:57:01');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (8,1,5,NULL,'WBS00023','checking resource','','2025-11-01','2025-11-08',1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-22 11:50:16',1,'2025-11-22 11:50:16');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (9,1,6,NULL,'TESTWBS001','Test WBS - 24/11','Testing Completion - 24/11 ','2025-11-24','2025-11-26',1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-24 11:05:10',1,'2025-11-24 11:05:10');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10,1,6,NULL,'WBS_LOCKING001','Testing_Lock_WBS','Testing Locking of WBS - 24/11','2025-11-24','2025-11-30',1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-24 11:09:28',1,'2025-11-24 11:09:28');
INSERT INTO `wbs` (`wbs_id`, `tenant_id`, `project_id`, `parent_wbs_id`, `wbs_code`, `wbs_name`, `description`, `start_date`, `end_date`, `level`, `work_center`, `cost_center`, `planned_qty`, `actual_qty`, `status`, `is_confirmed`, `confirmed_on`, `confirmed_by`, `is_locked`, `lock_date`, `activate_flag`, `created_by`, `created_on`, `updated_by`, `updated_on`) VALUES (10009,1,10006,NULL,'2345678','234567','23456789','2025-11-05','2025-11-19',1,NULL,NULL,NULL,0.00,'PLANNED',0,NULL,NULL,0,NULL,1,1,'2025-11-26 12:02:02',1,'2025-11-26 12:04:05');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_wbs_audit` AFTER INSERT ON `wbs` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'wbs',
        NEW.wbs_id,
        'INSERT',
        JSON_OBJECT(
            'wbs_code', NEW.wbs_code,
            'wbs_name', NEW.wbs_name,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'status', NEW.status,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_wbs_audit_update` AFTER UPDATE ON `wbs` FOR EACH ROW BEGIN
    INSERT INTO `audit_logs` (`tenant_id`, `table_name`, `record_id`, `action_type`, `old_data`, `new_data`, `changed_by`, `changed_on`)
    VALUES (
        NEW.tenant_id,
        'wbs',
        NEW.wbs_id,
        'UPDATE',
        JSON_OBJECT(
            'wbs_code', OLD.wbs_code,
            'wbs_name', OLD.wbs_name,
            'start_date', OLD.start_date,
            'end_date', OLD.end_date,
            'status', OLD.status,
            'activate_flag', OLD.activate_flag
        ),
        JSON_OBJECT(
            'wbs_code', NEW.wbs_code,
            'wbs_name', NEW.wbs_name,
            'start_date', NEW.start_date,
            'end_date', NEW.end_date,
            'status', NEW.status,
            'activate_flag', NEW.activate_flag
        ),
        COALESCE(NEW.updated_by, NEW.created_by, 0),
        NOW()
    );
END */;;
DELIMITER ;

--
-- Dumping events for database 'elina_db'
--

--
-- Dumping routines for database 'elina_db'
--

--
-- Final view structure for view `vw_project_summary`
--

/*!50001 DROP VIEW IF EXISTS `vw_project_summary`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vw_project_summary` AS select `p`.`project_id` AS `project_id`,`p`.`project_code` AS `project_code`,`p`.`project_name` AS `project_name`,`p`.`start_date` AS `start_date`,`p`.`end_date` AS `end_date`,`p`.`tenant_id` AS `tenant_id`,count(distinct `w`.`wbs_id`) AS `total_wbs_count`,count(distinct (case when (`w`.`status` = 'COMPLETED') then `w`.`wbs_id` end)) AS `completed_wbs_count`,count(distinct (case when (`w`.`status` = 'IN_PROGRESS') then `w`.`wbs_id` end)) AS `in_progress_wbs_count`,count(distinct (case when (`w`.`status` = 'PLANNED') then `w`.`wbs_id` end)) AS `planned_wbs_count`,coalesce(sum(`w`.`planned_qty`),0) AS `total_planned_qty`,coalesce(sum(`w`.`actual_qty`),0) AS `total_actual_qty` from (`projects` `p` left join `wbs` `w` on(((`p`.`project_id` = `w`.`project_id`) and (`p`.`tenant_id` = `w`.`tenant_id`) and (`w`.`activate_flag` = true)))) group by `p`.`project_id`,`p`.`project_code`,`p`.`project_name`,`p`.`start_date`,`p`.`end_date`,`p`.`tenant_id` */;

--
-- Final view structure for view `vw_task_performance`
--

/*!50001 DROP VIEW IF EXISTS `vw_task_performance`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vw_task_performance` AS select `t`.`task_id` AS `task_id`,`t`.`task_code` AS `task_code`,`t`.`task_name` AS `task_name`,`t`.`wbs_id` AS `wbs_id`,`w`.`wbs_code` AS `wbs_code`,`w`.`wbs_name` AS `wbs_name`,`t`.`planned_qty` AS `planned_qty`,coalesce(sum(`tu`.`actual_qty`),0) AS `total_actual_qty`,(`t`.`planned_qty` - coalesce(sum(`tu`.`actual_qty`),0)) AS `variance`,(case when (`t`.`planned_qty` > 0) then ((coalesce(sum(`tu`.`actual_qty`),0) / `t`.`planned_qty`) * 100) else 0 end) AS `completion_percentage`,`t`.`tenant_id` AS `tenant_id` from ((`tasks` `t` join `wbs` `w` on(((`t`.`wbs_id` = `w`.`wbs_id`) and (`t`.`tenant_id` = `w`.`tenant_id`)))) left join `task_updates` `tu` on(((`t`.`task_id` = `tu`.`task_id`) and (`t`.`tenant_id` = `tu`.`tenant_id`) and (`tu`.`activate_flag` = true)))) where (`t`.`activate_flag` = true) group by `t`.`task_id`,`t`.`task_code`,`t`.`task_name`,`t`.`wbs_id`,`w`.`wbs_code`,`w`.`wbs_name`,`t`.`planned_qty`,`t`.`tenant_id` */;

--
-- Final view structure for view `vw_wbs_progress`
--

/*!50001 DROP VIEW IF EXISTS `vw_wbs_progress`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vw_wbs_progress` AS select `w`.`wbs_id` AS `wbs_id`,`w`.`wbs_code` AS `wbs_code`,`w`.`wbs_name` AS `wbs_name`,`w`.`project_id` AS `project_id`,`p`.`project_code` AS `project_code`,`p`.`project_name` AS `project_name`,`w`.`start_date` AS `start_date`,`w`.`end_date` AS `end_date`,`w`.`planned_qty` AS `planned_qty`,`w`.`actual_qty` AS `actual_qty`,`w`.`status` AS `status`,`w`.`is_confirmed` AS `is_confirmed`,`w`.`is_locked` AS `is_locked`,`w`.`lock_date` AS `lock_date`,`w`.`tenant_id` AS `tenant_id`,(case when (`w`.`planned_qty` > 0) then ((`w`.`actual_qty` / `w`.`planned_qty`) * 100) else 0 end) AS `completion_percentage`,(`w`.`actual_qty` - `w`.`planned_qty`) AS `variance` from (`wbs` `w` join `projects` `p` on(((`w`.`project_id` = `p`.`project_id`) and (`w`.`tenant_id` = `p`.`tenant_id`)))) where (`w`.`activate_flag` = true) */;


