--
-- Host: localhost    Database: leasing_db
-- ------------------------------------------------------


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

CREATE TABLE `audit_logs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `action` varchar(255) NOT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) unsigned DEFAULT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `audit_logs_user_id_foreign` (`user_id`),
  CONSTRAINT `audit_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `audit_logs` VALUES (1,24,'PAYMENT_UPLOADED','App\\Models\\ManualPayment',1,NULL,NULL,'2026-03-26 08:15:27','2026-03-26 08:15:27'),(2,1,'PAYMENT_APPROVED','App\\Models\\ManualPayment',1,NULL,'{\"notes\":null}','2026-03-26 08:15:41','2026-03-26 08:15:41'),(3,25,'PAYMENT_UPLOADED','App\\Models\\ManualPayment',2,NULL,NULL,'2026-03-26 08:18:11','2026-03-26 08:18:11'),(4,1,'PAYMENT_APPROVED','App\\Models\\ManualPayment',2,NULL,'{\"notes\":null}','2026-03-26 08:18:25','2026-03-26 08:18:25'),(5,25,'RECORD_CREATED','App\\Models\\LeasingRecord',1,NULL,NULL,'2026-03-26 08:22:01','2026-03-26 08:22:01');

--
-- Table structure for table `branches`
--

CREATE TABLE `branches` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `leasing_profile_id` bigint(20) unsigned NOT NULL,
  `branch_name` varchar(255) NOT NULL,
  `address` text DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `branches_leasing_profile_id_foreign` (`leasing_profile_id`),
  CONSTRAINT `branches_leasing_profile_id_foreign` FOREIGN KEY (`leasing_profile_id`) REFERENCES `leasing_profiles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `branches`
--

INSERT INTO `branches` VALUES (1,1,'MEDAN','Genta Buana 07','08123456789765','2026-03-26 08:19:16','2026-03-26 08:19:16'),(2,1,'Jakarta','Genta buna 05','009876545676','2026-03-26 08:19:42','2026-03-26 08:19:42');

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext 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;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext 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;

--
-- Dumping data for table `job_batches`
--


--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) NOT NULL,
  `payload` longtext 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;

--
-- Dumping data for table `jobs`
--


--
-- Table structure for table `leasing_data_uploads`
--

CREATE TABLE `leasing_data_uploads` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `leasing_profile_id` bigint(20) unsigned NOT NULL,
  `filename` varchar(255) NOT NULL,
  `row_count` int(11) NOT NULL DEFAULT 0,
  `status` varchar(255) NOT NULL DEFAULT 'processing',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `leasing_data_uploads_leasing_profile_id_foreign` (`leasing_profile_id`),
  CONSTRAINT `leasing_data_uploads_leasing_profile_id_foreign` FOREIGN KEY (`leasing_profile_id`) REFERENCES `leasing_profiles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `leasing_data_uploads`
--


--
-- Table structure for table `leasing_profiles`
--

CREATE TABLE `leasing_profiles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `company_name` varchar(255) NOT NULL,
  `address` text DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `leasing_profiles_user_id_foreign` (`user_id`),
  CONSTRAINT `leasing_profiles_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;

--
-- Dumping data for table `leasing_profiles`
--

INSERT INTO `leasing_profiles` VALUES (1,25,'PT. GENTA BUANA LEASING',NULL,NULL,NULL,'2026-03-26 08:17:51','2026-03-26 08:17:51');

--
-- Table structure for table `leasing_records`
--

CREATE TABLE `leasing_records` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `leasing_profile_id` bigint(20) unsigned NOT NULL,
  `branch_id` bigint(20) unsigned DEFAULT NULL,
  `upload_id` bigint(20) unsigned DEFAULT NULL,
  `tgl_data` date NOT NULL,
  `nopol` varchar(255) NOT NULL,
  `rangka` varchar(255) NOT NULL,
  `mesin` varchar(255) NOT NULL,
  `model` varchar(255) DEFAULT NULL,
  `kendaraan` varchar(255) DEFAULT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(255) DEFAULT NULL,
  `customer_address` text DEFAULT NULL,
  `overdue_days` int(11) NOT NULL DEFAULT 0,
  `sisa_saldo` decimal(15,2) NOT NULL DEFAULT 0.00,
  `legal_flag` tinyint(1) NOT NULL DEFAULT 0,
  `member_warning` text DEFAULT NULL,
  `member_instruction` text DEFAULT NULL,
  `internal_note` text DEFAULT NULL,
  `record_status` varchar(255) NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `leasing_records_leasing_profile_id_foreign` (`leasing_profile_id`),
  KEY `leasing_records_branch_id_foreign` (`branch_id`),
  KEY `leasing_records_upload_id_foreign` (`upload_id`),
  KEY `leasing_records_nopol_index` (`nopol`),
  KEY `leasing_records_rangka_index` (`rangka`),
  KEY `leasing_records_mesin_index` (`mesin`),
  CONSTRAINT `leasing_records_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE SET NULL,
  CONSTRAINT `leasing_records_leasing_profile_id_foreign` FOREIGN KEY (`leasing_profile_id`) REFERENCES `leasing_profiles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `leasing_records_upload_id_foreign` FOREIGN KEY (`upload_id`) REFERENCES `leasing_data_uploads` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `leasing_records`
--

INSERT INTO `leasing_records` VALUES (1,1,1,NULL,'2026-03-26','B123344 BK','5678987656789','8976567898765','2021','Fortuner','Ucok','09876545678','medan Johor',378,45000000.00,0,'Melarikan Diri Kesiantar','Utamakan Tarik Unit','Ini Bukan Bukti Perintah Asli, Tidak mewakilkan apapun','active','2026-03-26 08:22:01','2026-03-26 08:22:01');

--
-- Table structure for table `manual_payments`
--

CREATE TABLE `manual_payments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `subscription_id` bigint(20) unsigned NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `transfer_date` date NOT NULL,
  `sender_name` varchar(255) NOT NULL,
  `proof_path` varchar(255) NOT NULL,
  `payment_status` varchar(255) NOT NULL DEFAULT 'pending',
  `reviewed_by` bigint(20) unsigned DEFAULT NULL,
  `reviewed_at` timestamp NULL DEFAULT NULL,
  `review_notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manual_payments_subscription_id_foreign` (`subscription_id`),
  KEY `manual_payments_reviewed_by_foreign` (`reviewed_by`),
  CONSTRAINT `manual_payments_reviewed_by_foreign` FOREIGN KEY (`reviewed_by`) REFERENCES `users` (`id`),
  CONSTRAINT `manual_payments_subscription_id_foreign` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `manual_payments`
--

INSERT INTO `manual_payments` VALUES (1,1,100000.00,'2026-03-26','surya','private/payments/proofs/24/1774538127_649116793_10225539886644001_6517222208887605089_n.jpg','approved',1,'2026-03-26 08:15:41',NULL,'2026-03-26 08:15:27','2026-03-26 08:15:41'),(2,2,1500000.00,'2026-03-26','buana','private/payments/proofs/25/1774538291_KAMPUS.png','approved',1,'2026-03-26 08:18:25',NULL,'2026-03-26 08:18:11','2026-03-26 08:18:25');

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` 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,'2026_03_25_000001_create_registrations_table',1),(5,'2026_03_25_000002_create_profiles_table',1),(6,'2026_03_25_000003_create_monetization_table',1),(7,'2026_03_25_000004_create_core_records_table',1),(8,'2026_03_25_000005_create_logs_table',1);

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` char(36) NOT NULL,
  `type` varchar(255) NOT NULL,
  `notifiable_type` varchar(255) NOT NULL,
  `notifiable_id` bigint(20) unsigned NOT NULL,
  `data` text NOT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` VALUES ('0501404e-3bdf-4af6-8f8c-1dabc4af0aba','App\\Notifications\\SystemNotification','App\\Models\\User',10,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/localhost:8000\\/dashboard\"}',NULL,'2026-03-25 22:05:52','2026-03-25 22:05:52'),('14cf0b27-f92f-4601-9e55-a555e0030a51','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User Test User telah mengunggah bukti bayar Rp 50.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-26 06:24:31','2026-03-26 06:24:31'),('29ce8be6-ab98-48a0-9544-7d34478d8ea3','App\\Notifications\\SystemNotification','App\\Models\\User',19,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/dashboard\"}',NULL,'2026-03-26 06:25:36','2026-03-26 06:25:36'),('2b9c2ed1-956c-4abb-91a1-d423985f66c2','App\\Notifications\\SystemNotification','App\\Models\\User',22,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/dashboard\"}',NULL,'2026-03-26 06:25:41','2026-03-26 06:25:41'),('2fac1c66-9d93-460e-9e6f-b9a571951424','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User ucok telah mengunggah bukti bayar Rp 50.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-26 05:34:50','2026-03-26 05:34:50'),('58386834-4c02-4e20-9730-9e468f076eb4','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User asal telah mengunggah bukti bayar Rp 1.500.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-26 06:29:33','2026-03-26 06:29:33'),('5a779b16-5cb5-459c-96cd-30e01eac4113','App\\Notifications\\SystemNotification','App\\Models\\User',23,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/dashboard\"}',NULL,'2026-03-26 06:30:44','2026-03-26 06:30:44'),('702fd7f9-04bc-4518-a580-c38a8601f50a','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User sniper telah mengunggah bukti bayar Rp 50.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/localhost:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-25 21:06:09','2026-03-25 21:06:09'),('8955845a-0953-42c3-8ca4-11aa13b076e9','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User Surya Putra Sianipar telah mengunggah bukti bayar Rp 100.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-26 08:15:27','2026-03-26 08:15:27'),('996caf8a-69ff-45f6-bd01-3a21d298cafc','App\\Notifications\\SystemNotification','App\\Models\\User',7,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/localhost:8000\\/dashboard\"}',NULL,'2026-03-25 22:05:59','2026-03-25 22:05:59'),('9beaeccf-4960-4760-b6fc-7b5eef9fe6aa','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User adira siantar telah mengunggah bukti bayar Rp 1.500.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/localhost:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-25 21:23:22','2026-03-25 21:23:22'),('a6620273-5ea5-484d-8d02-878752264996','App\\Notifications\\SystemNotification','App\\Models\\User',24,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/dashboard\"}',NULL,'2026-03-26 08:15:41','2026-03-26 08:15:41'),('b757ff45-dd40-4436-9b46-68c73ae7cb4e','App\\Notifications\\SystemNotification','App\\Models\\User',25,'{\"title\":\"Pembayaran Disetujui\",\"message\":\"Selamat! Pembayaran Anda telah dikonfirmasi dan akun Anda kini aktif.\",\"type\":\"success\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/dashboard\"}',NULL,'2026-03-26 08:18:25','2026-03-26 08:18:25'),('c0c78a9e-9cf3-473e-bf86-6a63c2c90de8','App\\Notifications\\SystemNotification','App\\Models\\User',1,'{\"title\":\"Review Pembayaran Baru\",\"message\":\"User BUANA telah mengunggah bukti bayar Rp 1.500.000\",\"type\":\"warning\",\"link\":\"http:\\/\\/127.0.0.1:8000\\/admin\\/payment-reviews\"}',NULL,'2026-03-26 08:18:11','2026-03-26 08:18:11');

--
-- Table structure for table `plans`
--

CREATE TABLE `plans` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `role_type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `price` decimal(15,2) NOT NULL,
  `duration_days` int(11) NOT NULL,
  `features_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`features_json`)),
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `plans`
--

INSERT INTO `plans` VALUES (1,'member','Member Bronze (30 Hari)',100000.00,30,'[\"Akses Data Nasional 30 Hari\"]',1,'2026-03-25 13:26:54','2026-03-26 08:06:43'),(2,'leasing','Leasing Startup (90 Hari)',1500000.00,90,'{\"record_limit\":1000,\"import_excel\":true}',1,'2026-03-25 13:26:54','2026-03-25 13:26:54');

--
-- Table structure for table `registrations`
--

CREATE TABLE `registrations` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `registration_type` varchar(255) NOT NULL,
  `registration_status` varchar(255) NOT NULL DEFAULT 'pending',
  `reviewed_at` timestamp NULL DEFAULT NULL,
  `reviewed_by` bigint(20) unsigned DEFAULT NULL,
  `review_notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `registrations_user_id_foreign` (`user_id`),
  KEY `registrations_reviewed_by_foreign` (`reviewed_by`),
  CONSTRAINT `registrations_reviewed_by_foreign` FOREIGN KEY (`reviewed_by`) REFERENCES `users` (`id`),
  CONSTRAINT `registrations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `registrations`
--

INSERT INTO `registrations` VALUES (1,24,'member','pending',NULL,NULL,NULL,'2026-03-26 08:14:44','2026-03-26 08:14:44'),(2,25,'leasing','pending',NULL,NULL,NULL,'2026-03-26 08:17:51','2026-03-26 08:17:51');

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

CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'admin','2026-03-25 13:26:53','2026-03-25 13:26:53'),(2,'leasing','2026-03-25 13:26:53','2026-03-25 13:26:53'),(3,'member','2026-03-25 13:26:53','2026-03-25 13:26:53');

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext 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;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` VALUES ('dpyCqoI93txH83Rub6ofJQQGEu8eq06tYDSWZHJe',NULL,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:149.0) Gecko/20100101 Firefox/149.0','YTozOntzOjY6Il90b2tlbiI7czo0MDoiV0NmNUNveHFxSVkyb3VwdXAyNDVOZGs2Qmh6NUpQeUNmZkxmek5mbiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7fX0=',1774538598),('nPk3h5qwmIT4C9sNTz6PkyWwHw5kDlJVun0mUfZy',1,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36','YTo1OntzOjY6Il90b2tlbiI7czo0MDoieDNreG9uUkFmbWk0cThMaDdpOXRkMGdVRnQ2TlFTb0RHd0lEMW9qaiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDM6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9hZG1pbi9wYXltZW50LXJldmlld3MiO31zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO3M6MzoidXJsIjthOjA6e319',1774542223),('QEC90msWLCdNhOMhZR2nV1utuST77WrQjtJL3PQ6',NULL,'127.0.0.1','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36','YTozOntzOjY6Il90b2tlbiI7czo0MDoic2I3d1htQ0hGZTFEZVVYWU9oY1VxVHZVYXRmSGxaR3JLUlZtZFpQNSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=',1774539058);

--
-- Table structure for table `subscriptions`
--

CREATE TABLE `subscriptions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `plan_id` bigint(20) unsigned NOT NULL,
  `subscription_status` varchar(255) NOT NULL DEFAULT 'inactive',
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `subscriptions_user_id_foreign` (`user_id`),
  KEY `subscriptions_plan_id_foreign` (`plan_id`),
  CONSTRAINT `subscriptions_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE,
  CONSTRAINT `subscriptions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `subscriptions`
--

INSERT INTO `subscriptions` VALUES (1,24,1,'active','2026-03-26','2026-04-25','2026-03-26 08:14:56','2026-03-26 08:15:41'),(2,25,2,'active','2026-03-26','2026-06-24','2026-03-26 08:17:57','2026-03-26 08:18:25');


