/*
SQLyog Community v13.3.0 (64 bit)
MySQL - 10.4.24-MariaDB : Database - laravel_vue
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*Table structure for table `activity_logs` */

DROP TABLE IF EXISTS `activity_logs`;

CREATE TABLE `activity_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `action` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `activity_logs_user_id_foreign` (`user_id`),
  CONSTRAINT `activity_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `activity_logs` */

/*Table structure for table `assistance_requests` */

DROP TABLE IF EXISTS `assistance_requests`;

CREATE TABLE `assistance_requests` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `control_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `resident_id` bigint(20) unsigned NOT NULL,
  `assistance_type` enum('MEDICAL','BURIAL','EDUCATIONAL','FINANCIAL','OTHER') COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount_requested` decimal(10,2) DEFAULT NULL,
  `amount_approved` decimal(10,2) DEFAULT NULL,
  `request_date` date NOT NULL,
  `approval_date` date DEFAULT NULL,
  `status` enum('PENDING','APPROVED','DISAPPROVED','RELEASED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'PENDING',
  `processed_by` bigint(20) unsigned DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `assistance_requests_control_no_unique` (`control_no`),
  KEY `assistance_requests_resident_id_foreign` (`resident_id`),
  KEY `assistance_requests_processed_by_foreign` (`processed_by`),
  CONSTRAINT `assistance_requests_processed_by_foreign` FOREIGN KEY (`processed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `assistance_requests_resident_id_foreign` FOREIGN KEY (`resident_id`) REFERENCES `residents` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `assistance_requests` */

/*Table structure for table `barangay_officials` */

DROP TABLE IF EXISTS `barangay_officials`;

CREATE TABLE `barangay_officials` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `resident_id` bigint(20) unsigned DEFAULT NULL,
  `full_name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `position` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `committee` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `term_start` date NOT NULL,
  `term_end` date DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `barangay_officials_resident_id_foreign` (`resident_id`),
  CONSTRAINT `barangay_officials_resident_id_foreign` FOREIGN KEY (`resident_id`) REFERENCES `residents` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `barangay_officials` */

/*Table structure for table `barangay_profiles` */

DROP TABLE IF EXISTS `barangay_profiles`;

CREATE TABLE `barangay_profiles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `municipality` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `province` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `region` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contact_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `logo_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `barangay_profiles` */

insert  into `barangay_profiles`(`id`,`name`,`municipality`,`province`,`region`,`address`,`contact_no`,`email`,`logo_path`,`created_at`,`updated_at`) values 
(1,'Barangay Mabua','Tandag City','Surigao Del Sur','CARAGA','Purok Langka Luha Mabua Tandag City Surigao Del Sur','0999999999999','test@email.com',NULL,NULL,NULL);

/*Table structure for table `barangay_session_attendance` */

DROP TABLE IF EXISTS `barangay_session_attendance`;

CREATE TABLE `barangay_session_attendance` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `session_id` bigint(20) unsigned NOT NULL,
  `official_id` bigint(20) unsigned NOT NULL,
  `status` enum('PRESENT','ABSENT','LATE','EXCUSED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'PRESENT',
  `remarks` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `barangay_session_attendance_session_id_official_id_unique` (`session_id`,`official_id`),
  KEY `barangay_session_attendance_official_id_foreign` (`official_id`),
  CONSTRAINT `barangay_session_attendance_official_id_foreign` FOREIGN KEY (`official_id`) REFERENCES `barangay_officials` (`id`) ON DELETE CASCADE,
  CONSTRAINT `barangay_session_attendance_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `barangay_sessions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `barangay_session_attendance` */

/*Table structure for table `barangay_sessions` */

DROP TABLE IF EXISTS `barangay_sessions`;

CREATE TABLE `barangay_sessions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `session_date` date NOT NULL,
  `type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Regular',
  `agenda` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `barangay_sessions` */

/*Table structure for table `blotter_hearings` */

DROP TABLE IF EXISTS `blotter_hearings`;

CREATE TABLE `blotter_hearings` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `blotter_id` bigint(20) unsigned NOT NULL,
  `hearing_date` datetime NOT NULL,
  `venue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `presiding_official_id` bigint(20) unsigned DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `result` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `blotter_hearings_blotter_id_foreign` (`blotter_id`),
  KEY `blotter_hearings_presiding_official_id_foreign` (`presiding_official_id`),
  CONSTRAINT `blotter_hearings_blotter_id_foreign` FOREIGN KEY (`blotter_id`) REFERENCES `blotters` (`id`) ON DELETE CASCADE,
  CONSTRAINT `blotter_hearings_presiding_official_id_foreign` FOREIGN KEY (`presiding_official_id`) REFERENCES `barangay_officials` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `blotter_hearings` */

/*Table structure for table `blotters` */

DROP TABLE IF EXISTS `blotters`;

CREATE TABLE `blotters` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `blotter_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `complainant_id` bigint(20) unsigned DEFAULT NULL,
  `complainant_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `respondent_id` bigint(20) unsigned DEFAULT NULL,
  `respondent_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `incident_type` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `incident_place` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `incident_datetime` datetime DEFAULT NULL,
  `details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('OPEN','UNDER_MEDIATION','SETTLED','REFERRED','ESCALATED','CLOSED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'OPEN',
  `created_by` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `blotters_blotter_no_unique` (`blotter_no`),
  KEY `blotters_complainant_id_foreign` (`complainant_id`),
  KEY `blotters_respondent_id_foreign` (`respondent_id`),
  KEY `blotters_created_by_foreign` (`created_by`),
  CONSTRAINT `blotters_complainant_id_foreign` FOREIGN KEY (`complainant_id`) REFERENCES `residents` (`id`) ON DELETE SET NULL,
  CONSTRAINT `blotters_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`),
  CONSTRAINT `blotters_respondent_id_foreign` FOREIGN KEY (`respondent_id`) REFERENCES `residents` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `blotters` */

insert  into `blotters`(`id`,`blotter_no`,`complainant_id`,`complainant_name`,`respondent_id`,`respondent_name`,`incident_type`,`incident_place`,`incident_datetime`,`details`,`status`,`created_by`,`created_at`,`updated_at`) values 
(1,'BLT-2025-HYGCHRBP',3,NULL,9,NULL,'test type','asasdasdasd','2025-10-01 09:32:00','this is the specific details thasd s asdf asdf asdf sadf sdfsadf','CLOSED',1,'2025-11-21 01:32:36','2025-12-01 13:17:38');

/*Table structure for table `cache` */

DROP TABLE IF EXISTS `cache`;

CREATE TABLE `cache` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `cache` */

/*Table structure for table `cache_locks` */

DROP TABLE IF EXISTS `cache_locks`;

CREATE TABLE `cache_locks` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `cache_locks` */

/*Table structure for table `clearance_requests` */

DROP TABLE IF EXISTS `clearance_requests`;

CREATE TABLE `clearance_requests` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `control_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `resident_id` bigint(20) unsigned DEFAULT NULL,
  `applicant_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `clearance_type_id` bigint(20) unsigned NOT NULL,
  `purpose` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fee_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `or_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `request_date` date NOT NULL,
  `released_date` date DEFAULT NULL,
  `status` enum('PENDING','APPROVED','REJECTED','RELEASED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'PENDING',
  `processed_by` bigint(20) unsigned DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `clearance_requests_control_no_unique` (`control_no`),
  KEY `clearance_requests_resident_id_foreign` (`resident_id`),
  KEY `clearance_requests_clearance_type_id_foreign` (`clearance_type_id`),
  KEY `clearance_requests_processed_by_foreign` (`processed_by`),
  CONSTRAINT `clearance_requests_clearance_type_id_foreign` FOREIGN KEY (`clearance_type_id`) REFERENCES `clearance_types` (`id`),
  CONSTRAINT `clearance_requests_processed_by_foreign` FOREIGN KEY (`processed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `clearance_requests_resident_id_foreign` FOREIGN KEY (`resident_id`) REFERENCES `residents` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `clearance_requests` */

insert  into `clearance_requests`(`id`,`control_no`,`resident_id`,`applicant_name`,`clearance_type_id`,`purpose`,`fee_amount`,`or_no`,`request_date`,`released_date`,`status`,`processed_by`,`remarks`,`created_at`,`updated_at`) values 
(1,'CLR-2025-AB2XLLDG',3,NULL,1,'THis is the purpose of the clearance for now',50.00,'345345','2025-11-20','2025-11-21','APPROVED',NULL,'this is the example remarks','2025-11-20 03:21:44','2025-11-20 03:22:02'),
(2,'CLR-2025-IONV3QRM',3,NULL,2,'test purpose',50.00,NULL,'2025-12-01','2025-12-01','APPROVED',NULL,'this ias hasd asd asd asd asdasd','2025-12-01 13:19:00','2025-12-01 13:19:43');

/*Table structure for table `clearance_types` */

DROP TABLE IF EXISTS `clearance_types`;

CREATE TABLE `clearance_types` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `default_fee` decimal(10,2) NOT NULL DEFAULT 0.00,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `clearance_types_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `clearance_types` */

insert  into `clearance_types`(`id`,`name`,`slug`,`default_fee`,`is_active`,`created_at`,`updated_at`) values 
(1,'Barangay Clearance','barangay-clearance',50.00,1,'2025-11-17 04:38:00','2025-11-17 04:38:00'),
(2,'Certificate of Residency','certificate-residency',0.00,1,'2025-11-17 04:38:00','2025-11-17 04:38:00'),
(3,'Certificate of Indigency','certificate-indigency',0.00,1,'2025-11-17 04:38:00','2025-11-17 04:38:00');

/*Table structure for table `duplicate_detections` */

DROP TABLE IF EXISTS `duplicate_detections`;

CREATE TABLE `duplicate_detections` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `resident_id` bigint(20) unsigned NOT NULL,
  `potential_duplicate_id` bigint(20) unsigned NOT NULL,
  `similarity_score` decimal(5,2) NOT NULL,
  `matched_fields` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`matched_fields`)),
  `status` enum('PENDING','RESOLVED','IGNORED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'PENDING',
  `resolved_by` bigint(20) unsigned DEFAULT NULL,
  `resolved_at` timestamp NULL DEFAULT NULL,
  `resolution_notes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `duplicate_detections_resident_id_foreign` (`resident_id`),
  KEY `duplicate_detections_potential_duplicate_id_foreign` (`potential_duplicate_id`),
  KEY `duplicate_detections_resolved_by_foreign` (`resolved_by`),
  CONSTRAINT `duplicate_detections_potential_duplicate_id_foreign` FOREIGN KEY (`potential_duplicate_id`) REFERENCES `residents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `duplicate_detections_resident_id_foreign` FOREIGN KEY (`resident_id`) REFERENCES `residents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `duplicate_detections_resolved_by_foreign` FOREIGN KEY (`resolved_by`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `duplicate_detections` */

/*Table structure for table `failed_jobs` */

DROP TABLE IF EXISTS `failed_jobs`;

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `failed_jobs` */

/*Table structure for table `households` */

DROP TABLE IF EXISTS `households`;

CREATE TABLE `households` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `household_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `purok_id` bigint(20) unsigned DEFAULT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `house_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `street` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `village` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `province` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `household_head_id` bigint(20) unsigned DEFAULT NULL,
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `households_household_no_unique` (`household_no`),
  KEY `households_purok_id_foreign` (`purok_id`),
  KEY `households_household_head_id_foreign` (`household_head_id`),
  CONSTRAINT `households_household_head_id_foreign` FOREIGN KEY (`household_head_id`) REFERENCES `residents` (`id`) ON DELETE SET NULL,
  CONSTRAINT `households_purok_id_foreign` FOREIGN KEY (`purok_id`) REFERENCES `puroks` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `households` */

insert  into `households`(`id`,`household_no`,`purok_id`,`address`,`house_no`,`street`,`village`,`city`,`province`,`household_head_id`,`latitude`,`longitude`,`remarks`,`created_at`,`updated_at`) values 
(1,'HH-001',NULL,'Purok Langka Luha Mabua Tandag City',NULL,NULL,NULL,NULL,NULL,3,123.3450000,123.3450000,'this is the example remakrds','2025-11-20 02:57:41','2025-11-20 02:57:41');

/*Table structure for table `job_batches` */

DROP TABLE IF EXISTS `job_batches`;

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `job_batches` */

/*Table structure for table `jobs` */

DROP TABLE IF EXISTS `jobs`;

CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL,
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `jobs` */

/*Table structure for table `migrations` */

DROP TABLE IF EXISTS `migrations`;

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `migrations` */

insert  into `migrations`(`id`,`migration`,`batch`) values 
(1,'0001_01_01_000000_create_users_table',1),
(2,'0001_01_01_000001_create_cache_table',1),
(3,'0001_01_01_000002_create_jobs_table',1),
(4,'2025_01_01_000000_create_roles_and_user_roles_tables',2),
(5,'2025_01_01_000100_create_reference_tables',2),
(6,'2025_01_01_000200_create_households_and_residents_tables',2),
(7,'2025_01_01_000300_create_barangay_officials_and_sessions_tables',2),
(8,'2025_01_01_000400_create_clearances_tables',2),
(9,'2025_01_01_000500_create_blotters_tables',2),
(10,'2025_01_01_000600_create_social_services_tables',2),
(11,'2025_01_15_000000_update_residents_and_households_for_compliance',3);

/*Table structure for table `password_reset_tokens` */

DROP TABLE IF EXISTS `password_reset_tokens`;

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `password_reset_tokens` */

/*Table structure for table `permission_role` */

DROP TABLE IF EXISTS `permission_role`;

CREATE TABLE `permission_role` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) unsigned NOT NULL,
  `permission_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_role_role_id_permission_id_unique` (`role_id`,`permission_id`),
  KEY `permission_role_permission_id_foreign` (`permission_id`),
  CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `permission_role` */

/*Table structure for table `permissions` */

DROP TABLE IF EXISTS `permissions`;

CREATE TABLE `permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `permissions` */

/*Table structure for table `program_beneficiaries` */

DROP TABLE IF EXISTS `program_beneficiaries`;

CREATE TABLE `program_beneficiaries` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `resident_id` bigint(20) unsigned NOT NULL,
  `program_type` enum('SENIOR','PWD','SOLO_PARENT','4PS','SCHOLARSHIP','OTHER') COLLATE utf8mb4_unicode_ci NOT NULL,
  `id_card_no` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enrollment_date` date DEFAULT NULL,
  `status` enum('ACTIVE','INACTIVE') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `program_beneficiaries_resident_id_foreign` (`resident_id`),
  CONSTRAINT `program_beneficiaries_resident_id_foreign` FOREIGN KEY (`resident_id`) REFERENCES `residents` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `program_beneficiaries` */

/*Table structure for table `puroks` */

DROP TABLE IF EXISTS `puroks`;

CREATE TABLE `puroks` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `puroks` */

insert  into `puroks`(`id`,`name`,`description`,`created_at`,`updated_at`) values 
(1,'Purok Lang Luha Mabua','This is the example description','2025-11-20 14:08:36','2025-11-20 14:08:36');

/*Table structure for table `ref_civil_statuses` */

DROP TABLE IF EXISTS `ref_civil_statuses`;

CREATE TABLE `ref_civil_statuses` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `ref_civil_statuses` */

insert  into `ref_civil_statuses`(`id`,`name`) values 
(1,'Single'),
(2,'Married'),
(3,'Widowed'),
(4,'Separated'),
(5,'Live-in');

/*Table structure for table `ref_education_levels` */

DROP TABLE IF EXISTS `ref_education_levels`;

CREATE TABLE `ref_education_levels` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `ref_education_levels` */

insert  into `ref_education_levels`(`id`,`name`) values 
(1,'No Formal Education'),
(2,'Elementary'),
(3,'High School'),
(4,'Senior High'),
(5,'Vocational'),
(6,'College'),
(7,'Post Graduate');

/*Table structure for table `ref_occupations` */

DROP TABLE IF EXISTS `ref_occupations`;

CREATE TABLE `ref_occupations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `ref_occupations` */

insert  into `ref_occupations`(`id`,`name`) values 
(1,'Farmer'),
(2,'Fisherfolk'),
(3,'Laborer'),
(4,'Self-employed'),
(5,'Professional');

/*Table structure for table `ref_religions` */

DROP TABLE IF EXISTS `ref_religions`;

CREATE TABLE `ref_religions` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `ref_religions` */

insert  into `ref_religions`(`id`,`name`) values 
(1,'Roman Catholic'),
(2,'Islam'),
(3,'Iglesia ni Cristo'),
(4,'Born Again Christian'),
(5,'Others');

/*Table structure for table `resident_relationships` */

DROP TABLE IF EXISTS `resident_relationships`;

CREATE TABLE `resident_relationships` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `resident_id` bigint(20) unsigned NOT NULL,
  `related_resident_id` bigint(20) unsigned NOT NULL,
  `relationship_type` enum('SPOUSE','CHILD','PARENT','SIBLING','GUARDIAN','OTHER') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `resident_relationships_resident_id_foreign` (`resident_id`),
  KEY `resident_relationships_related_resident_id_foreign` (`related_resident_id`),
  CONSTRAINT `resident_relationships_related_resident_id_foreign` FOREIGN KEY (`related_resident_id`) REFERENCES `residents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `resident_relationships_resident_id_foreign` FOREIGN KEY (`resident_id`) REFERENCES `residents` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `resident_relationships` */

/*Table structure for table `residents` */

DROP TABLE IF EXISTS `residents`;

CREATE TABLE `residents` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `household_id` bigint(20) unsigned DEFAULT NULL,
  `last_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `first_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `middle_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `suffix` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sex` enum('M','F') COLLATE utf8mb4_unicode_ci NOT NULL,
  `birthdate` date NOT NULL,
  `birthplace` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `civil_status_id` tinyint(3) unsigned DEFAULT NULL,
  `religion_id` tinyint(3) unsigned DEFAULT NULL,
  `education_level_id` tinyint(3) unsigned DEFAULT NULL,
  `occupation_id` int(10) unsigned DEFAULT NULL,
  `voter_status` enum('REGISTERED','NOT_REGISTERED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NOT_REGISTERED',
  `precinct_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `citizenship` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Filipino',
  `contact_no` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_pwd` tinyint(1) NOT NULL DEFAULT 0,
  `is_senior` tinyint(1) NOT NULL DEFAULT 0,
  `is_solo_parent` tinyint(1) NOT NULL DEFAULT 0,
  `is_4ps` tinyint(1) NOT NULL DEFAULT 0,
  `resident_category` enum('NONE','SENIOR','PWD','SOLO_PARENT','4PS','SENIOR_PWD','SENIOR_SOLO_PARENT','PWD_SOLO_PARENT','SENIOR_PWD_SOLO_PARENT') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NONE',
  `id_no` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `picture_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `id_picture_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `signature_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `thumbmark_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('ACTIVE','MOVED_OUT','DECEASED') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ACTIVE',
  `date_moved_out` date DEFAULT NULL,
  `date_deceased` date DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `avatar` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `residents_household_id_foreign` (`household_id`),
  KEY `residents_civil_status_id_foreign` (`civil_status_id`),
  KEY `residents_religion_id_foreign` (`religion_id`),
  KEY `residents_education_level_id_foreign` (`education_level_id`),
  KEY `residents_occupation_id_foreign` (`occupation_id`),
  CONSTRAINT `residents_civil_status_id_foreign` FOREIGN KEY (`civil_status_id`) REFERENCES `ref_civil_statuses` (`id`) ON DELETE SET NULL,
  CONSTRAINT `residents_education_level_id_foreign` FOREIGN KEY (`education_level_id`) REFERENCES `ref_education_levels` (`id`) ON DELETE SET NULL,
  CONSTRAINT `residents_household_id_foreign` FOREIGN KEY (`household_id`) REFERENCES `households` (`id`) ON DELETE SET NULL,
  CONSTRAINT `residents_occupation_id_foreign` FOREIGN KEY (`occupation_id`) REFERENCES `ref_occupations` (`id`) ON DELETE SET NULL,
  CONSTRAINT `residents_religion_id_foreign` FOREIGN KEY (`religion_id`) REFERENCES `ref_religions` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `residents` */

insert  into `residents`(`id`,`household_id`,`last_name`,`first_name`,`middle_name`,`suffix`,`sex`,`birthdate`,`birthplace`,`civil_status_id`,`religion_id`,`education_level_id`,`occupation_id`,`voter_status`,`precinct_no`,`citizenship`,`contact_no`,`email`,`is_pwd`,`is_senior`,`is_solo_parent`,`is_4ps`,`resident_category`,`id_no`,`picture_path`,`id_picture_path`,`signature_path`,`thumbmark_path`,`status`,`date_moved_out`,`date_deceased`,`remarks`,`created_at`,`updated_at`,`avatar`) values 
(1,NULL,'asdas','dasdas','dasdasd',NULL,'M','2025-11-11',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 01:09:55','2025-11-18 01:09:55',NULL),
(2,NULL,'waaaaaaa','waaaaa','waaa',NULL,'M','2025-10-30',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 01:12:23','2025-11-18 01:12:23',NULL),
(3,NULL,'Dela Cruz','Jason','Dela',NULL,'M','2025-11-14',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 01:34:11','2025-11-18 01:34:11',NULL),
(4,NULL,'Gala','Josilito','Kalidad',NULL,'M','2025-11-20',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 01:35:47','2025-11-18 01:35:47',NULL),
(5,NULL,'Gamad','Juanito','Conjurado',NULL,'M','1988-06-25',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 07:00:58','2025-11-18 07:00:58',NULL),
(6,NULL,'Gammad','asd','asdfgdfg',NULL,'M','2025-11-12',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 11:17:01','2025-11-18 11:17:01','avatars/PffvFgOax5ZINenuYf5h7Y1ujsMPHZrREjS3ETZj.jpg'),
(7,NULL,'domqieui','ddfgdfg','dfgdfgdfg',NULL,'M','2025-11-19',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 11:44:06','2025-11-18 11:44:06','avatars/wA9SL9wOr2YMTc12McuHFAisj2Sod8dtltpyJ5vs.jpg'),
(8,NULL,'felipmon','dfgsdfg','sdfgsdfgdfg',NULL,'M','2025-11-15',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-18 11:52:56','2025-11-18 11:52:56','1763466776_492422469_10213212816510389_8967638500888060920_n.jpg'),
(9,NULL,'Suarez','LIza','Guiral',NULL,'F','1988-12-25',NULL,NULL,NULL,NULL,NULL,'NOT_REGISTERED',NULL,'Filipino',NULL,NULL,0,0,0,0,'NONE',NULL,NULL,NULL,NULL,NULL,'ACTIVE',NULL,NULL,NULL,'2025-11-20 01:57:52','2025-11-20 01:57:52','1763603872_3250484.png');

/*Table structure for table `role_user` */

DROP TABLE IF EXISTS `role_user`;

CREATE TABLE `role_user` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `role_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `role_user_user_id_role_id_unique` (`user_id`,`role_id`),
  KEY `role_user_role_id_foreign` (`role_id`),
  CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `role_user` */

insert  into `role_user`(`id`,`user_id`,`role_id`,`created_at`,`updated_at`) values 
(1,1,1,'2025-11-17 13:05:39','2025-11-17 13:05:42');

/*Table structure for table `roles` */

DROP TABLE IF EXISTS `roles`;

CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_slug_unique` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `roles` */

insert  into `roles`(`id`,`name`,`slug`,`created_at`,`updated_at`) values 
(1,'System Administrator','system-admin','2025-11-17 04:38:00','2025-11-17 04:38:00'),
(2,'Barangay Staff','barangay-staff','2025-11-17 04:38:00','2025-11-17 04:38:00'),
(3,'Read Only','read-only','2025-11-17 04:38:00','2025-11-17 04:38:00');

/*Table structure for table `sessions` */

DROP TABLE IF EXISTS `sessions`;

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `sessions` */

insert  into `sessions`(`id`,`user_id`,`ip_address`,`user_agent`,`payload`,`last_activity`) values 
('eA48aNkzVkcP6ZbKgHXFnnUOtexADYLW23SncL3v',1,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36','YTo1OntzOjY6Il90b2tlbiI7czo0MDoiYmNGSFBoTVhITmZFajJKMXJUdnFwSk1MRDZld3Q2YmYxQXl0YTdETSI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoyMToiaHR0cDovLzEyNy4wLjAuMTo4MDAwIjt9czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJkYXNoYm9hcmQiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO30=',1786180260);

/*Table structure for table `signatories` */

DROP TABLE IF EXISTS `signatories`;

CREATE TABLE `signatories` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
  `position` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `signature_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `signatories` */

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Data for the table `users` */

insert  into `users`(`id`,`avatar`,`name`,`email`,`email_verified_at`,`password`,`remember_token`,`created_at`,`updated_at`) values 
(1,'F:\\xampp_version\\PHP8\\tmp\\php910C.tmp','Juan Dela Cruz','admin@email.com',NULL,'$2y$12$eWtSY5UIiY1k.BaDeLXgiucGJbz0paHF4rHvpe.8nVW8AETjypVWe','GpoWVIH95vHCHLCVTOrTyPCn3ORDyhwqNIHmNI7i6mO1J1n4tJ3ERJTotc2P','2025-11-11 00:07:00','2026-08-08 09:06:59'),
(2,'avatars/cGtamDI2gswsorCsTh0oC3ZMaC5Tz1qhkWAS1egD.png','Test Name','test1@email.com',NULL,'$2y$12$SgDDqyL2u.vBnl9tEp2gxu4i10g1A31Sdhc8zEn21GMxt3UJvc/dm',NULL,'2025-11-11 00:08:11','2025-11-11 00:08:11'),
(3,NULL,'Test name 3','test2@email.com',NULL,'$2y$12$BTi0sGSRDwyzm4/2RFW5jeZM8PG/tBcw6jvgri26kSc6aXImMFI8q',NULL,'2025-11-11 00:25:03','2025-11-11 00:25:03'),
(4,'avatars/YzflcuhxKbjIJtDJjAUjSVO1iMvqTyUCrkVE8u0w.jpg','Test name 5','test4@email.com',NULL,'$2y$12$amfSMgZIDJ.mOTdRGgiYpO/jZjENWaDwLOJPFbZwxajIsK9.kzc1q',NULL,'2025-11-11 00:33:16','2025-11-11 00:33:16'),
(5,NULL,'Mckenzie Goodwin','esteban.runolfsdottir@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','yph7kVzeOz','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(6,NULL,'Maryam Russel','mona92@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','oZelY79XLp','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(7,NULL,'Carlee Gusikowski','angelo.windler@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','Tg6iRgK5y9','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(8,NULL,'Cicero Quigley','schaefer.jazmin@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','CxVW2v3IR1','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(9,NULL,'Dr. Coby Romaguera DVM','gmcclure@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','4SHnDaBhtB','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(10,NULL,'Frederique Mann','mccullough.hailey@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','h7S0zLkRtk','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(11,NULL,'Norval Stoltenberg','micah.lesch@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','Wf6Dpn1fLG','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(12,NULL,'Prof. Justus Rice','florence.swift@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','kpTfKWy4Y0','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(13,NULL,'Heidi Simonis','dejon60@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','fXYq1nLGDq','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(14,NULL,'Ladarius Zboncak','dora40@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','mNyc7gUzNK','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(15,NULL,'Ashleigh McClure MD','aletha.kutch@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','lj0tEBZvhG','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(16,NULL,'Dr. Toy Gerlach III','armstrong.ben@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','0pKyRMurOd','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(17,NULL,'Alvena Halvorson','karlee.trantow@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','YNeP2GBARp','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(18,NULL,'Brad Feeney','cole.fern@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','mnNYJSxWI1','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(19,NULL,'Cristobal Gerhold','pnicolas@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','agMmMWfUmE','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(20,NULL,'Jerrold Wisozk','imcglynn@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','F424NJdaI5','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(21,NULL,'Javon Fahey','ottis20@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','OuZMVTCguR','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(22,NULL,'Alysson Mertz','yost.isaias@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','Hto0hcb19a','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(23,NULL,'Efrain McClure V','jazlyn20@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','kvpvTzyb5M','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(24,NULL,'Angelica Hahn Sr.','balistreri.frederick@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','16qAjgGHoZ','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(25,NULL,'Abraham Kshlerin','candice.boehm@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','rCOByZYW65','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(26,NULL,'Minerva Gleichner','gorczany.quinton@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','fOrkTDtLmr','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(27,NULL,'Skye Stokes','hickle.retha@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','7m0s60IDFs','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(28,NULL,'Eulah Kozey','wilfred.gibson@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','g3CmkcMUNN','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(29,NULL,'Rollin Gutkowski IV','rowe.lloyd@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','7bLwkYtz1F','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(30,NULL,'Ona Keeling','randy.murazik@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','rEvl4sCHba','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(31,NULL,'Raul Wolff','liliane.hettinger@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','hSn3pwGrs2','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(32,NULL,'Ms. Kenyatta Pollich','anderson.damien@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','FpbinTUH4d','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(33,NULL,'Lois Swaniawski','winnifred04@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','UlI3WakXds','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(34,NULL,'Miss Juanita Stokes','pkemmer@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','Uf9LWq9g7A','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(35,NULL,'David Nolan','eunice.frami@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','beIzO3ULBB','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(36,NULL,'Madge Cartwright','kaia.dibbert@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','kqJgjy9dvQ','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(37,NULL,'Prof. Grayce Monahan','qhalvorson@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','VbKfAiNFxX','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(38,NULL,'Ms. Sandy Feil','oschmidt@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','lGqk9pVWms','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(39,NULL,'Wiley Rodriguez','mallie.considine@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','sxJUMXfoHl','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(40,NULL,'Dr. Issac Jones PhD','fay.jonathon@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','7H2BwfqoCH','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(41,NULL,'Mr. Colby Goyette','kuphal.drake@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','snmDNqemnn','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(42,NULL,'Micah Hintz','norn@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','WDNGaJUmSj','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(43,NULL,'Della Legros','xlindgren@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','CTUbnIWjnZ','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(44,NULL,'Weston Hackett','antonietta.hackett@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','9OLSoakGow','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(45,NULL,'Ms. Larissa Jacobson DDS','vluettgen@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','wXFSNJbiOA','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(46,NULL,'Monty Larkin','dstracke@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','3Cv4xD4bnN','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(47,NULL,'Prof. Alphonso Kessler','hoeger.curtis@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','2rtEAaxu0T','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(48,NULL,'Miss Carlie McLaughlin II','huel.annamarie@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','eNwpNyoxIl','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(49,NULL,'Taya Legros','faufderhar@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','9TKIyqnBRh','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(50,NULL,'Adriana Shanahan','afritsch@example.com','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','8uSFE0asB6','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(51,NULL,'Raquel Kling V','lennie.halvorson@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','zr83k05aOM','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(52,NULL,'Naomi Quigley','dion.kling@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','15wY2JXjvx','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(53,NULL,'Jeff Gaylord','ckub@example.net','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','jQUO4cSsW0','2025-11-11 00:34:56','2025-11-11 00:34:56'),
(54,NULL,'Natalie Kulas','rozella60@example.org','2025-11-11 00:34:56','$2y$12$6LuuvUlX9yXe5s5SS4OgUuMhKSUrM.2vvjvhKTyj8LlqEWLGafM2u','6ltGeDHabq','2025-11-11 00:34:56','2025-11-11 00:34:56');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
