-- https://www.phpmyadmin.net/
--

START TRANSACTION;



-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `category_name` varchar(255) NOT NULL,
  `is_default` tinyint(4) NOT NULL DEFAULT 0 COMMENT '1 = default category, 0 = user-created',
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `category_name`, `is_default`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 'General', 1, NULL, '2025-11-25 09:27:50', '2025-11-25 09:27:50'),
(2, 'Marketing', 1, NULL, '2025-11-25 09:27:50', '2025-11-25 09:27:50'),
(3, 'News', 1, NULL, '2025-11-25 09:27:50', '2025-11-25 09:27:50'),
(4, 'Technology', 1, NULL, '2025-11-25 09:27:50', '2025-11-25 09:27:50'),
(5, 'Entertainment', 1, NULL, '2025-11-25 09:27:50', '2025-11-25 09:27:50'),
(6, 'Business', 1, NULL, '2025-11-25 09:27:50', '2025-11-25 09:27:50'),
(7, 'TEST', 0, 3, '2025-12-04 04:21:59', '2025-12-04 04:21:59');

-- --------------------------------------------------------

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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

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

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

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

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

--
-- Dumping data for 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, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2025_01_20_000000_create_app_users_table', 1),
(6, '2025_01_21_000000_create_password_reset_tokens_table', 1),
(7, '2025_01_21_000001_add_company_fields_to_app_users_table', 1),
(8, '2025_01_22_000000_remove_company_category_business_fields_from_app_users_table', 1),
(9, '2025_10_15_000000_update_users_add_role_timezone_status', 1),
(10, '2025_10_15_000100_create_subscription_plans_table', 1),
(11, '2025_10_15_000200_create_subscriptions_table', 1),
(12, '2025_11_13_080151_create_categories_table', 1),
(13, '2025_11_20_000300_create_posts_table', 1),
(14, '2025_11_20_000400_create_post_media_table', 1),
(15, '2025_11_20_010500_remove_email_verified_at_from_users_table', 1),
(16, '2025_01_23_000000_add_scheduled_at_to_posts_table', 2);

-- --------------------------------------------------------

--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `app_user_id` bigint(20) UNSIGNED NOT NULL,
  `content` text NOT NULL,
  `content_html` longtext DEFAULT NULL,
  `status` enum('draft','scheduled','posted') DEFAULT 'draft',
  `category` varchar(100) DEFAULT 'General',
  `platforms` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `published_at` timestamp NULL DEFAULT NULL,
  `scheduled_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `posts`
--

INSERT INTO `posts` (`id`, `app_user_id`, `content`, `content_html`, `status`, `category`, `platforms`, `published_at`, `scheduled_at`, `created_at`, `updated_at`) VALUES
(1, 3, 'Test post', 'Test post', 'posted', 'General', NULL, '2025-11-26 00:50:52', NULL, '2025-11-26 00:50:26', '2025-11-26 00:50:52'),
(2, 3, 'Test another', 'Test another', 'posted', 'General', NULL, '2025-11-26 00:51:33', NULL, '2025-11-26 00:51:33', '2025-11-26 00:51:33'),
(4, 3, 'Draft check', 'Draft check', 'draft', 'General', NULL, '2025-11-26 03:32:50', NULL, '2025-11-26 03:31:42', '2025-11-26 03:32:50'),
(9, 3, 'tetst', 'tetst', 'draft', 'General', NULL, NULL, NULL, '2025-11-26 04:42:53', '2025-11-26 04:42:53'),
(10, 3, 'new', 'new', 'draft', 'General', NULL, NULL, NULL, '2025-11-26 05:08:34', '2025-11-26 05:08:34'),
(11, 3, 'test', 'test', 'posted', 'General', NULL, '2025-11-26 06:50:39', NULL, '2025-11-26 05:12:38', '2025-11-26 06:50:39'),
(12, 3, 'New', 'New', 'draft', 'General', NULL, NULL, NULL, '2025-11-26 06:56:04', '2025-11-26 06:56:04'),
(13, 3, 'ds', 'ds', 'draft', 'General', NULL, NULL, NULL, '2025-11-26 07:08:56', '2025-11-26 07:08:56'),
(14, 3, 'ddddffd12345677', 'ddddffd12345677', 'draft', 'Business', NULL, NULL, NULL, '2025-11-26 08:16:36', '2025-11-27 05:48:03'),
(15, 3, 'Hi hari', 'Hi hari', 'draft', 'General', NULL, NULL, NULL, '2025-11-27 06:03:35', '2025-11-27 06:03:35'),
(16, 3, 'Harii', 'Harii', 'draft', 'General', NULL, NULL, NULL, '2025-11-27 06:04:36', '2025-11-27 06:04:36'),
(17, 3, 'TEST', 'TEST', 'draft', 'General', NULL, NULL, NULL, '2025-11-27 06:11:07', '2025-11-27 06:11:07'),
(18, 3, 'TETSTTTTT', 'TETSTTTTT', 'posted', 'General', NULL, '2025-11-27 06:30:08', NULL, '2025-11-27 06:15:01', '2025-11-27 06:30:08'),
(19, 3, 'Hii GH', 'Hii GH', 'posted', 'General', NULL, '2025-11-27 06:24:18', NULL, '2025-11-27 06:23:29', '2025-11-27 06:24:18'),
(20, 3, 'For Schedule testing', 'For Schedule testing', 'posted', 'General', NULL, '2025-11-27 09:09:00', NULL, '2025-11-27 08:05:44', '2025-11-27 09:10:13'),
(21, 3, 'Schedule', 'Schedule', 'draft', 'General', NULL, NULL, NULL, '2025-11-27 08:20:43', '2025-11-27 08:29:31'),
(22, 3, 'sadasd', 'sadasd', 'draft', 'General', NULL, NULL, NULL, '2025-11-27 08:28:47', '2025-11-27 08:28:47'),
(23, 3, 'HI Hari How are you', 'HI Hari How are you', 'posted', 'TEST', NULL, '2025-12-04 04:25:00', NULL, '2025-12-04 04:22:28', '2025-12-04 04:27:38'),
(24, 3, 'TEST NEW', 'TEST NEW', 'posted', 'TEST', NULL, '2025-12-04 05:12:09', NULL, '2025-12-04 05:12:09', '2025-12-04 05:12:09'),
(25, 3, 'NEW', 'NEW', 'posted', 'General', NULL, '2025-12-04 05:15:00', NULL, '2025-12-04 05:12:38', '2025-12-04 05:15:09'),
(26, 3, 'Ganesh Roman', 'Ganesh Roman', 'draft', 'General', NULL, NULL, NULL, '2025-12-04 05:20:30', '2025-12-04 05:20:30');

-- --------------------------------------------------------

--
-- Table structure for table `post_media`
--

CREATE TABLE `post_media` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` bigint(20) UNSIGNED NOT NULL,
  `app_user_id` bigint(20) UNSIGNED NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_path` varchar(500) NOT NULL,
  `file_url` varchar(500) DEFAULT NULL,
  `file_type` varchar(50) DEFAULT NULL,
  `file_size` bigint(20) UNSIGNED DEFAULT NULL,
  `mime_type` varchar(100) DEFAULT NULL,
  `display_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `post_media`
--

INSERT INTO `post_media` (`id`, `post_id`, `app_user_id`, `file_name`, `file_path`, `file_url`, `file_type`, `file_size`, `mime_type`, `display_order`, `created_at`, `updated_at`) VALUES
(2, 9, 3, 'WhatsApp Image 2025-10-21 at 7.05.35 PM.jpeg', 'post_uploads/9/XSl3ZHrFP8Jnvp4MfsMCzkLDAfr8xGl6J8Tue48j.jpg', 'http://social-platform/post_uploads/9/XSl3ZHrFP8Jnvp4MfsMCzkLDAfr8xGl6J8Tue48j.jpg', 'image/jpeg', 63114, 'image/jpeg', 0, '2025-11-26 04:42:53', '2025-11-26 04:42:53'),
(3, 10, 3, 'WhatsApp Image 2025-10-21 at 8.03.32 PM.jpeg', 'post_uploads/10/sQGpGIGbz3JRrfqw1YxqdpqL1gsquyB5E9upoOMw.jpg', 'http://social-platform/post_uploads/10/sQGpGIGbz3JRrfqw1YxqdpqL1gsquyB5E9upoOMw.jpg', 'image/jpeg', 182358, 'image/jpeg', 0, '2025-11-26 05:08:34', '2025-11-26 05:08:34'),
(4, 11, 3, 'boy image with misc report.png', 'post_uploads/11/6AR6gw63hnl88zTBwYPhLKsBVjTQBpmiEgYRq0Tv.png', 'http://social-platform/post_uploads/11/6AR6gw63hnl88zTBwYPhLKsBVjTQBpmiEgYRq0Tv.png', 'image/png', 1263531, 'image/png', 0, '2025-11-26 05:12:38', '2025-11-26 05:12:38'),
(5, 12, 3, 'tnpsc photo compressor (1).jpg', 'post_uploads/12/qN5UmdaOIz4n81N03tLx7TGnPfVepiBskhKIP4p2.jpg', 'http://social-platform/post_uploads/12/qN5UmdaOIz4n81N03tLx7TGnPfVepiBskhKIP4p2.jpg', 'image/jpeg', 43219, 'image/jpeg', 0, '2025-11-26 06:56:04', '2025-11-26 06:56:04'),
(6, 13, 3, 'WhatsApp Image 2025-10-21 at 8.03.32 PM.jpeg', 'post_uploads/13/PYRAsu52OSokuvW8617J3qrVMT8NZmtQeMVjGTxl.jpg', 'http://social-platform/post_uploads/13/PYRAsu52OSokuvW8617J3qrVMT8NZmtQeMVjGTxl.jpg', 'image/jpeg', 182358, 'image/jpeg', 0, '2025-11-26 07:08:56', '2025-11-26 07:08:56'),
(7, 4, 3, 'IMG_20251111_222832103.jpg', 'post_uploads/4/YwoUSdIr867Sr2hGNu3ojjgZ3tBabLbETlGsp2J0.jpg', 'http://social-platform/post_uploads/4/YwoUSdIr867Sr2hGNu3ojjgZ3tBabLbETlGsp2J0.jpg', 'image/jpeg', 1500569, 'image/jpeg', 0, '2025-11-26 07:48:23', '2025-11-26 07:48:23'),
(9, 14, 3, 'WhatsApp Image 2025-10-21 at 7.02.41 PM.jpeg', 'post_uploads/14/RqzVXhTb7a0cul1TMyF1Qxx3Ouq44m0I88vqgaIE.jpg', 'http://social-platform/post_uploads/14/RqzVXhTb7a0cul1TMyF1Qxx3Ouq44m0I88vqgaIE.jpg', 'image/jpeg', 38434, 'image/jpeg', 1, '2025-11-27 04:58:35', '2025-11-27 04:58:35'),
(13, 14, 3, 'WhatsApp Image 2025-10-21 at 8.03.32 PM.jpeg', 'post_uploads/14/LH7WIhafw7SyaLGHLvmSuWKaxfrRaR4WiR5zXJwO.jpg', 'http://social-platform/post_uploads/14/LH7WIhafw7SyaLGHLvmSuWKaxfrRaR4WiR5zXJwO.jpg', 'image/jpeg', 182358, 'image/jpeg', 5, '2025-11-27 05:24:50', '2025-11-27 05:24:50'),
(14, 15, 3, 'tnpsc photo compressor (1).jpg', 'post_uploads/15/YbuK2gtAbOKksVEmbDYIpm7cbq23Re5d13z6eSIZ.jpg', 'http://social-platform/post_uploads/15/YbuK2gtAbOKksVEmbDYIpm7cbq23Re5d13z6eSIZ.jpg', 'image/jpeg', 43219, 'image/jpeg', 0, '2025-11-27 06:03:35', '2025-11-27 06:03:35'),
(15, 15, 3, 'tnpsc photo compressor (1).jpg', 'post_uploads/15/a5CZmXLv4T5kJePiJYASfimC07CujT5ZPUzc1z5B.jpg', 'http://social-platform/post_uploads/15/a5CZmXLv4T5kJePiJYASfimC07CujT5ZPUzc1z5B.jpg', 'image/jpeg', 43219, 'image/jpeg', 1, '2025-11-27 06:03:37', '2025-11-27 06:03:37'),
(16, 15, 3, 'tnpsc photo compressor (1).jpg', 'post_uploads/15/I2F4GEY91M51bqvKBcglH77H39etpcbqIordl5fR.jpg', 'http://social-platform/post_uploads/15/I2F4GEY91M51bqvKBcglH77H39etpcbqIordl5fR.jpg', 'image/jpeg', 43219, 'image/jpeg', 2, '2025-11-27 06:03:40', '2025-11-27 06:03:40'),
(17, 16, 3, 'WhatsApp Image 2025-11-07 at 2.42.36 PM.jpeg', 'post_uploads/16/YuN1sjU8iSE425EkP0vmnNbvkevovNy1Cai413HK.jpg', 'http://social-platform/post_uploads/16/YuN1sjU8iSE425EkP0vmnNbvkevovNy1Cai413HK.jpg', 'image/jpeg', 427344, 'image/jpeg', 0, '2025-11-27 06:04:36', '2025-11-27 06:04:36'),
(18, 17, 3, 'IMG_20251111_222832103.jpg', 'post_uploads/17/3dQvDA5IdH7wowQtn5Tw0eJ2C6MT4qvwgVqM5CLs.jpg', 'http://social-platform/post_uploads/17/3dQvDA5IdH7wowQtn5Tw0eJ2C6MT4qvwgVqM5CLs.jpg', 'image/jpeg', 1500569, 'image/jpeg', 0, '2025-11-27 06:11:07', '2025-11-27 06:11:07'),
(19, 18, 3, 'IMG_20251111_222832103.jpg', 'post_uploads/18/NNDOMdVMekj2lBAs2R4JAJB2AH1ix9Ajimof9STb.jpg', 'http://social-platform/post_uploads/18/NNDOMdVMekj2lBAs2R4JAJB2AH1ix9Ajimof9STb.jpg', 'image/jpeg', 1500569, 'image/jpeg', 0, '2025-11-27 06:15:01', '2025-11-27 06:15:01'),
(21, 19, 3, 'IMG20250626190705.jpg', 'post_uploads/19/MUN2COdcEwuQDxUKhdyUZSdDWJbVRsqPIvf5oJQu.jpg', 'http://social-platform/post_uploads/19/MUN2COdcEwuQDxUKhdyUZSdDWJbVRsqPIvf5oJQu.jpg', 'image/jpeg', 247491, 'image/jpeg', 0, '2025-11-27 06:23:29', '2025-11-27 06:23:29'),
(22, 19, 3, 'IMG_20251111_222832103.jpg', 'post_uploads/19/98SBBVsYVo8cSD4OYwaGOGFYHWvTc64VGU9twvkB.jpg', 'http://social-platform/post_uploads/19/98SBBVsYVo8cSD4OYwaGOGFYHWvTc64VGU9twvkB.jpg', 'image/jpeg', 1500569, 'image/jpeg', 1, '2025-11-27 06:24:04', '2025-11-27 06:24:04'),
(23, 20, 3, 'boy image with misc report.png', 'post_uploads/20/r5JSk2akCi0THWuVXDXnF7nBwhCyO4JwuOnBtoM5.png', 'http://social-platform/post_uploads/20/r5JSk2akCi0THWuVXDXnF7nBwhCyO4JwuOnBtoM5.png', 'image/png', 1263531, 'image/png', 0, '2025-11-27 08:05:44', '2025-11-27 08:05:44'),
(24, 23, 3, 'pngwing.com (6).png', 'post_uploads/23/xEQhPkmLROTHVEFNEigUZTQLEPV4eLsoMQQ6av12.png', 'http://social-platform/post_uploads/23/xEQhPkmLROTHVEFNEigUZTQLEPV4eLsoMQQ6av12.png', 'image/png', 401707, 'image/png', 0, '2025-12-04 04:22:28', '2025-12-04 04:22:28'),
(25, 24, 3, 'boy image with misc report.png', 'post_uploads/24/B54uCKPOGY9ELpbQXDarZuc027N0wb70ra5b69M1.png', 'http://social-platform/post_uploads/24/B54uCKPOGY9ELpbQXDarZuc027N0wb70ra5b69M1.png', 'image/png', 1263531, 'image/png', 0, '2025-12-04 05:12:09', '2025-12-04 05:12:09');

-- --------------------------------------------------------

--
-- 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('1ojZvDLGpHudnjHlNJImfguYrE2vIeyecRabJLc9', NULL, '192.168.0.102', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoidlZ2b2Q0MTM1R0ltNHJ1cGZzeUkyYzRDNTB3Q0RqRFJ3WThxcXRGNSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHA6Ly9zb2NpYWwtcGxhdGZvcm0vYWRtaW4vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1764769510),
('8iLh9UVvvaPiaXwfXFqGj6gl6xAETLIt2ZwPRdSU', NULL, '192.168.0.102', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiUW5pT041QlN5U01JYUhLdVoyNWduVUZVTXhhdllQcGd0MG91TTNSYyI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHA6Ly9zb2NpYWwtcGxhdGZvcm0vYWRtaW4vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1764165766),
('9OwsKDHNAI29LT8PYKJddVpogFmgCqXLSeoH7QNB', NULL, '192.168.0.102', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiS3ZCV25HTWRKRjN0OEdYa0dtRktvaVJ1NUF6RVFvdkFlM0xWVGduQSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHA6Ly9zb2NpYWwtcGxhdGZvcm0vYWRtaW4vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1764679954),
('ChlcQb3Cu4bvxSTjP9YcGXHbMMuGOHQwz3ijOz82', 1, '192.168.0.100', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiZUpOa0Nlb3hBeVh6WExkbndWcFcySnBxclVvREJXbnhCSVBCNU0xeiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mzg6Imh0dHA6Ly9zb2NpYWwtcGxhdGZvcm0vYWRtaW4vZGFzaGJvYXJkIjt9czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1764082696),
('iGdz3jzdtemyP0iK8VQIY1HqMrsYIixSff78RsBm', NULL, '192.168.0.102', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiYVhFczh4Wm94M1FkNVdmNms2ZlBCdEYzdGRBY2ZsU3NJWWlnRER3MyI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHA6Ly9zb2NpYWwtcGxhdGZvcm0vYWRtaW4vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1764747481),
('vwi1llGWCIRFmWuu8a13qGB2DEvYb1z0d9vYVgn1', NULL, '192.168.0.102', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoidFFMRnVCTDFSN0Q2WDI1NVpzZGxNMElGZDRiMXVDTk8wU3RRRU9ldSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHA6Ly9zb2NpYWwtcGxhdGZvcm0vYWRtaW4vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1764840798);

-- --------------------------------------------------------

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

CREATE TABLE `subscriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `status` enum('active','expired','cancelled') NOT NULL DEFAULT 'active',
  `payment_method` enum('stripe','paypal','manual') NOT NULL DEFAULT 'manual',
  `transaction_id` varchar(150) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `subscription_plans`
--

CREATE TABLE `subscription_plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `duration` enum('monthly','yearly') NOT NULL DEFAULT 'monthly',
  `max_posts_per_month` int(11) NOT NULL DEFAULT 0,
  `max_social_accounts` int(11) NOT NULL DEFAULT 0,
  `ai_credits` int(11) NOT NULL DEFAULT 0,
  `features` longtext DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `categories_is_default_index` (`is_default`),
  ADD KEY `categories_user_id_index` (`user_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `posts_status_index` (`status`),
  ADD KEY `posts_app_user_id_status_index` (`app_user_id`,`status`),
  ADD KEY `posts_published_at_index` (`published_at`),
  ADD KEY `posts_created_at_index` (`created_at`),
  ADD KEY `posts_scheduled_at_index` (`scheduled_at`),
  ADD KEY `posts_status_scheduled_at_index` (`status`,`scheduled_at`);

--
-- Indexes for table `post_media`
--
ALTER TABLE `post_media`
  ADD PRIMARY KEY (`id`),
  ADD KEY `post_media_post_id_index` (`post_id`),
  ADD KEY `post_media_app_user_id_index` (`app_user_id`),
  ADD KEY `post_media_post_id_display_order_index` (`post_id`,`display_order`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subscriptions_user_id_foreign` (`user_id`),
  ADD KEY `subscriptions_plan_id_foreign` (`plan_id`);

--
-- Indexes for table `subscription_plans`
--
ALTER TABLE `subscription_plans`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `post_media`
--
ALTER TABLE `post_media`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `subscriptions`
--
ALTER TABLE `subscriptions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `subscription_plans`
--
ALTER TABLE `subscription_plans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
  ADD CONSTRAINT `categories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `app_users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `posts`
--
ALTER TABLE `posts`
  ADD CONSTRAINT `posts_app_user_id_foreign` FOREIGN KEY (`app_user_id`) REFERENCES `app_users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `post_media`
--
ALTER TABLE `post_media`
  ADD CONSTRAINT `post_media_app_user_id_foreign` FOREIGN KEY (`app_user_id`) REFERENCES `app_users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `post_media_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD CONSTRAINT `subscriptions_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `subscription_plans` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `subscriptions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

