-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 17, 2026 at 11:34 AM
-- Server version: 10.11.17-MariaDB
-- PHP Version: 8.4.22

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `magicads`
--

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

--
-- Table structure for table `admin_keys`
--

CREATE TABLE `admin_keys` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `openai_key` text DEFAULT NULL,
  `gemini_key` text DEFAULT NULL,
  `xai_key` text DEFAULT NULL,
  `nova_key` text DEFAULT NULL,
  `anthropic_key` text DEFAULT NULL,
  `runway_key` text DEFAULT NULL,
  `kling_key` text DEFAULT NULL,
  `seedance_key` text DEFAULT NULL,
  `fal_key` text DEFAULT NULL,
  `flux_key` text DEFAULT NULL,
  `ideogram_key` text DEFAULT NULL,
  `recraft_key` text DEFAULT NULL,
  `kie_key` text DEFAULT NULL,
  `google_maps_api_key` varchar(255) DEFAULT NULL,
  `google_analytics_property_id` varchar(255) DEFAULT NULL,
  `google_analytics_service_credentials` varchar(255) DEFAULT NULL,
  `google_analytics_tracking_id` varchar(255) DEFAULT NULL,
  `google_recaptcha_site_key` varchar(255) DEFAULT NULL,
  `google_recaptcha_secret_key` varchar(255) 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 `admin_keys`
--

INSERT INTO `admin_keys` (`id`, `openai_key`, `gemini_key`, `xai_key`, `nova_key`, `anthropic_key`, `runway_key`, `kling_key`, `seedance_key`, `fal_key`, `flux_key`, `ideogram_key`, `recraft_key`, `kie_key`, `google_maps_api_key`, `google_analytics_property_id`, `google_analytics_service_credentials`, `google_analytics_tracking_id`, `google_recaptcha_site_key`, `google_recaptcha_secret_key`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-17 03:08:43', '2026-07-17 03:08:43');

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

--
-- Table structure for table `ad_accounts`
--

CREATE TABLE `ad_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `provider` varchar(20) NOT NULL,
  `external_id` varchar(191) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `currency` varchar(10) DEFAULT NULL,
  `timezone` varchar(64) DEFAULT NULL,
  `access_token` text DEFAULT NULL,
  `refresh_token` text DEFAULT NULL,
  `access_token_expires_at` timestamp NULL DEFAULT NULL,
  `refresh_token_expires_at` timestamp NULL DEFAULT NULL,
  `metadata` text DEFAULT NULL,
  `last_synced_at` timestamp NULL DEFAULT NULL,
  `last_sync_status` varchar(20) DEFAULT NULL,
  `last_sync_error` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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 `ad_analytics_settings`
--

CREATE TABLE `ad_analytics_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ad_analytics_feature` tinyint(1) NOT NULL DEFAULT 0,
  `ad_analytics_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `ai_pricing` text DEFAULT NULL,
  `meta_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `google_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `tiktok_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `meta_client_id` text DEFAULT NULL,
  `meta_client_secret` text DEFAULT NULL,
  `google_client_id` text DEFAULT NULL,
  `google_client_secret` text DEFAULT NULL,
  `google_developer_token` text DEFAULT NULL,
  `google_login_customer_id` text DEFAULT NULL,
  `tiktok_app_id` text DEFAULT NULL,
  `tiktok_client_secret` text 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 `ad_analytics_settings`
--

INSERT INTO `ad_analytics_settings` (`id`, `ad_analytics_feature`, `ad_analytics_free_tier`, `ai_pricing`, `meta_enabled`, `google_enabled`, `tiktok_enabled`, `meta_client_id`, `meta_client_secret`, `google_client_id`, `google_client_secret`, `google_developer_token`, `google_login_customer_id`, `tiktok_app_id`, `tiktok_client_secret`, `created_at`, `updated_at`) VALUES
(1, 0, 0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-17 03:08:41', '2026-07-17 03:08:41');

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

--
-- Table structure for table `ad_copies`
--

CREATE TABLE `ad_copies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `brand_id` bigint(20) UNSIGNED DEFAULT NULL,
  `title` varchar(160) DEFAULT NULL,
  `platform` varchar(40) NOT NULL,
  `objective` varchar(30) DEFAULT NULL,
  `framework` varchar(40) DEFAULT NULL,
  `tone` varchar(40) DEFAULT NULL,
  `engine` varchar(30) NOT NULL DEFAULT 'openai',
  `model_id` varchar(60) DEFAULT NULL,
  `language` varchar(20) NOT NULL DEFAULT 'en',
  `product_description` text DEFAULT NULL,
  `target_audience` text DEFAULT NULL,
  `key_benefits` text DEFAULT NULL,
  `keywords` text DEFAULT NULL,
  `cta` varchar(40) DEFAULT NULL,
  `extra_instructions` text DEFAULT NULL,
  `variants` text DEFAULT NULL,
  `meta` text DEFAULT NULL,
  `status` enum('pending','processing','completed','failed') NOT NULL DEFAULT 'pending',
  `error_message` text DEFAULT NULL,
  `credits` double NOT NULL DEFAULT 0,
  `words` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `is_favorite` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `project_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ad_creatives`
--

CREATE TABLE `ad_creatives` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('image','video') NOT NULL,
  `status` enum('pending','processing','completed','failed') NOT NULL DEFAULT 'pending',
  `provider` varchar(30) NOT NULL,
  `model_id` varchar(100) DEFAULT NULL,
  `prompt` text NOT NULL,
  `preset_slug` varchar(30) NOT NULL,
  `width` smallint(5) UNSIGNED NOT NULL,
  `height` smallint(5) UNSIGNED NOT NULL,
  `duration` tinyint(3) UNSIGNED DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `mime_type` varchar(50) DEFAULT NULL,
  `file_size` int(10) UNSIGNED DEFAULT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `brand_kit_snapshot` text DEFAULT NULL,
  `generation_meta` text DEFAULT NULL,
  `error_message` text DEFAULT NULL,
  `provider_job_id` varchar(255) DEFAULT NULL,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `last_polled_at` timestamp NULL DEFAULT NULL,
  `poll_count` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `storage_disk` varchar(20) DEFAULT 'local',
  `completed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `project_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ad_insights`
--

CREATE TABLE `ad_insights` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `range_from` date NOT NULL,
  `range_to` date NOT NULL,
  `provider` varchar(20) DEFAULT NULL,
  `summary` longtext DEFAULT NULL,
  `recommendations` text DEFAULT NULL,
  `metrics_snapshot` text DEFAULT NULL,
  `credits_spent` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `headline` varchar(255) DEFAULT NULL,
  `overall_health` varchar(20) DEFAULT NULL,
  `wins` text DEFAULT NULL,
  `risks` text 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 `ad_metrics`
--

CREATE TABLE `ad_metrics` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `ad_account_id` bigint(20) UNSIGNED NOT NULL,
  `provider` varchar(20) NOT NULL,
  `level` varchar(12) NOT NULL,
  `entity_id` varchar(191) NOT NULL,
  `entity_name` varchar(255) DEFAULT NULL,
  `campaign_id` varchar(191) DEFAULT NULL,
  `campaign_name` varchar(255) DEFAULT NULL,
  `date` date NOT NULL,
  `impressions` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `clicks` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `spend` decimal(16,4) NOT NULL DEFAULT 0.0000,
  `conversions` decimal(14,2) NOT NULL DEFAULT 0.00,
  `conversion_value` decimal(16,4) NOT NULL DEFAULT 0.0000,
  `currency` varchar(10) 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 `avatar_studio_avatars`
--

CREATE TABLE `avatar_studio_avatars` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `avatar_id` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `gender` varchar(20) DEFAULT NULL,
  `preview_image` text DEFAULT NULL,
  `preview_video` text DEFAULT NULL,
  `sort_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;

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

--
-- Table structure for table `avatar_studio_creations`
--

CREATE TABLE `avatar_studio_creations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(30) NOT NULL DEFAULT 'spokesperson',
  `title` varchar(255) DEFAULT NULL,
  `script` text DEFAULT NULL,
  `source_files` text DEFAULT NULL,
  `meta` text DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `provider_job_id` varchar(255) DEFAULT NULL,
  `result_path` varchar(255) DEFAULT NULL,
  `mime_type` varchar(50) DEFAULT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `error_message` text DEFAULT NULL,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `last_polled_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `poll_count` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `is_favorite` tinyint(1) 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;

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

--
-- Table structure for table `avatar_studio_stock_voices`
--

CREATE TABLE `avatar_studio_stock_voices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `voice_id` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `language` varchar(255) DEFAULT NULL,
  `gender` varchar(20) DEFAULT NULL,
  `preview` text DEFAULT NULL,
  `sort_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;

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

--
-- Table structure for table `avatar_studio_voices`
--

CREATE TABLE `avatar_studio_voices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `heygen_voice_id` varchar(255) DEFAULT NULL,
  `audio_asset_id` varchar(255) DEFAULT NULL,
  `sample_path` varchar(255) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'ready',
  `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 `blog_comments`
--

CREATE TABLE `blog_comments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `blog_post_id` bigint(20) UNSIGNED NOT NULL,
  `parent_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `website` varchar(255) DEFAULT NULL,
  `content` text NOT NULL,
  `status` enum('pending','approved','spam','rejected') NOT NULL DEFAULT 'pending',
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) 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 `blog_posts`
--

CREATE TABLE `blog_posts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `excerpt` varchar(500) DEFAULT NULL,
  `content` longtext NOT NULL,
  `featured_image` text DEFAULT NULL,
  `featured_image_alt` varchar(255) DEFAULT NULL,
  `author_name` varchar(255) NOT NULL DEFAULT 'AI Ad Studio Team',
  `author_avatar` varchar(255) DEFAULT NULL,
  `author_role` varchar(255) DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL,
  `tags` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`tags`)),
  `status` enum('draft','published','archived') NOT NULL DEFAULT 'draft',
  `published_at` timestamp NULL DEFAULT NULL,
  `is_featured` tinyint(1) NOT NULL DEFAULT 0,
  `meta_title` varchar(70) DEFAULT NULL,
  `meta_description` varchar(160) DEFAULT NULL,
  `meta_keywords` text DEFAULT NULL,
  `canonical_url` varchar(255) DEFAULT NULL,
  `reading_time_minutes` int(10) UNSIGNED NOT NULL DEFAULT 5,
  `view_count` bigint(20) 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;

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

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `slug` varchar(140) DEFAULT NULL,
  `website_url` varchar(255) DEFAULT NULL,
  `industry` varchar(60) DEFAULT NULL,
  `tagline` varchar(180) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `logo_path` varchar(255) DEFAULT NULL,
  `cover_path` varchar(255) DEFAULT NULL,
  `primary_color` varchar(7) DEFAULT NULL,
  `secondary_color` varchar(7) DEFAULT NULL,
  `accent_color` varchar(7) DEFAULT NULL,
  `font_family` varchar(60) DEFAULT NULL,
  `tone_of_voice` varchar(40) DEFAULT NULL,
  `target_audience` text DEFAULT NULL,
  `brand_values` text DEFAULT NULL,
  `social_handles` text DEFAULT NULL,
  `ad_platforms` text DEFAULT NULL,
  `custom_fields` text DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `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 `brand_kits`
--

CREATE TABLE `brand_kits` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `logo_path` varchar(255) DEFAULT NULL,
  `primary_color` varchar(7) DEFAULT NULL,
  `secondary_color` varchar(7) DEFAULT NULL,
  `tagline` varchar(120) 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 `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `channel_broadcasts`
--

CREATE TABLE `channel_broadcasts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `ad_copy_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ad_copy_variant` int(10) UNSIGNED DEFAULT NULL,
  `ad_creative_id` bigint(20) UNSIGNED DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `message` longtext DEFAULT NULL,
  `link_url` varchar(1024) DEFAULT NULL,
  `link_label` varchar(255) DEFAULT NULL,
  `media_type` varchar(20) DEFAULT NULL,
  `media_path` varchar(1024) DEFAULT NULL,
  `media_disk` varchar(50) DEFAULT NULL,
  `media_mime` varchar(120) DEFAULT NULL,
  `schedule_type` varchar(20) NOT NULL DEFAULT 'immediately',
  `scheduled_at` timestamp NULL DEFAULT NULL,
  `recurrence_start_at` timestamp NULL DEFAULT NULL,
  `recurrence_end_at` timestamp NULL DEFAULT NULL,
  `recurrence_interval_minutes` int(10) UNSIGNED DEFAULT NULL,
  `recurrence_days` varchar(20) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'draft',
  `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 `channel_broadcast_destinations`
--

CREATE TABLE `channel_broadcast_destinations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `channel` varchar(30) NOT NULL,
  `name` varchar(255) NOT NULL,
  `avatar` varchar(1024) DEFAULT NULL,
  `credentials` text DEFAULT NULL,
  `metadata` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `last_test_ok` tinyint(1) DEFAULT NULL,
  `last_tested_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;

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

--
-- Table structure for table `channel_broadcast_settings`
--

CREATE TABLE `channel_broadcast_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `channel_broadcast_feature` tinyint(1) NOT NULL DEFAULT 0,
  `channel_broadcast_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `ai_pricing` text DEFAULT NULL,
  `whatsapp_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `telegram_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `slack_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `email_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `messenger_enabled` tinyint(1) 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 `channel_broadcast_settings`
--

INSERT INTO `channel_broadcast_settings` (`id`, `channel_broadcast_feature`, `channel_broadcast_free_tier`, `ai_pricing`, `whatsapp_enabled`, `telegram_enabled`, `slack_enabled`, `email_enabled`, `messenger_enabled`, `created_at`, `updated_at`) VALUES
(1, 0, 0, NULL, 0, 0, 0, 0, 0, '2026-07-17 03:08:39', '2026-07-17 03:08:39');

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

--
-- Table structure for table `channel_broadcast_targets`
--

CREATE TABLE `channel_broadcast_targets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `broadcast_id` bigint(20) UNSIGNED NOT NULL,
  `destination_id` bigint(20) UNSIGNED NOT NULL,
  `channel` varchar(30) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `remote_id` varchar(255) DEFAULT NULL,
  `recipients_sent` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `error` text DEFAULT NULL,
  `attempts` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `run_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `next_run_at` timestamp NULL DEFAULT NULL,
  `last_attempt_at` timestamp NULL DEFAULT NULL,
  `sent_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;

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

--
-- Table structure for table `cloud_storages`
--

CREATE TABLE `cloud_storages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `provider` varchar(40) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 0,
  `config` text 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 `cookie_settings`
--

CREATE TABLE `cookie_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `enable_cookies` tinyint(1) NOT NULL DEFAULT 0,
  `enable_dark_mode` tinyint(1) NOT NULL DEFAULT 0,
  `disable_page_interaction` tinyint(1) NOT NULL DEFAULT 0,
  `hide_from_bots` tinyint(1) NOT NULL DEFAULT 1,
  `consent_modal_layouts` varchar(255) DEFAULT 'box',
  `consent_modal_position` varchar(255) DEFAULT 'bottom right',
  `preferences_modal_layout` varchar(255) DEFAULT 'box',
  `preferences_modal_position` varchar(255) DEFAULT 'right',
  `cookie_valid_days` int(11) NOT NULL DEFAULT 7,
  `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 `coupons`
--

CREATE TABLE `coupons` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `percentage` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `max_redemptions` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `redeemed_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `per_user_limit` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `owner_id` bigint(20) UNSIGNED DEFAULT NULL,
  `batch_id` varchar(40) DEFAULT NULL,
  `valid_from` timestamp NULL DEFAULT NULL,
  `valid_until` timestamp NULL DEFAULT NULL,
  `note` text 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 `coupon_redemptions`
--

CREATE TABLE `coupon_redemptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `coupon_id` bigint(20) UNSIGNED DEFAULT NULL,
  `code` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `percentage` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `order_id` varchar(50) DEFAULT NULL,
  `original_amount` decimal(15,2) DEFAULT NULL,
  `discount_amount` decimal(15,2) DEFAULT NULL,
  `currency` char(3) DEFAULT NULL,
  `redeemed_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;

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

--
-- Table structure for table `creative_ad_links`
--

CREATE TABLE `creative_ad_links` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `ad_account_id` bigint(20) UNSIGNED NOT NULL,
  `creative_id` bigint(20) UNSIGNED NOT NULL,
  `provider` varchar(20) NOT NULL,
  `external_ad_id` varchar(191) NOT NULL,
  `external_ad_name` varchar(255) DEFAULT NULL,
  `method` varchar(12) NOT NULL DEFAULT 'manual',
  `confidence` tinyint(3) UNSIGNED NOT NULL DEFAULT 100,
  `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 `email_settings`
--

CREATE TABLE `email_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `driver` varchar(255) DEFAULT NULL,
  `host` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `encryption` varchar(255) DEFAULT NULL,
  `from_address` varchar(255) DEFAULT NULL,
  `from_name` varchar(255) 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 `extensions`
--

CREATE TABLE `extensions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `slug` varchar(255) NOT NULL,
  `version` varchar(255) NOT NULL,
  `installed` tinyint(1) NOT NULL DEFAULT 0,
  `is_theme` tinyint(1) NOT NULL DEFAULT 0,
  `is_free` tinyint(1) NOT NULL DEFAULT 0,
  `purchased` tinyint(1) NOT NULL DEFAULT 0,
  `is_featured` tinyint(1) 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 `extensions`
--

INSERT INTO `extensions` (`id`, `slug`, `version`, `installed`, `is_theme`, `is_free`, `purchased`, `is_featured`, `created_at`, `updated_at`) VALUES
(1, 'magicads-saas', '1.6', 1, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:27:06'),
(2, 'magicads-fashion-studio', '1.1', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(3, 'magicads-product-photoshoot', '1.2', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(4, 'magicads-avatar-studio', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(5, 'magicads-ugc-factory', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(6, 'magicads-amazon-s3', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(7, 'magicads-wasabi', '1.0', 1, 0, 1, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:26:09'),
(8, 'magicads-team', '1.0', 1, 0, 1, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:26:00'),
(9, 'magicads-social-media-studio', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(10, 'magicads-prompt-marketplace', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(11, 'magicads-cloudflare-r2', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(12, 'magicads-google-cloud-storage', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(13, 'magicads-channel-broadcast', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(14, 'magicads-gift-cards', '1.1', 1, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:27:12'),
(15, 'magicads-coupons', '1.1', 1, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:27:16'),
(16, 'magicads-ad-performance-analytics', '1.0', 0, 0, 0, 0, 0, '2026-07-17 11:25:35', '2026-07-17 11:25:35'),
(17, 'magicadsclassic', '1.0', 0, 1, 0, 0, 0, '2026-07-17 11:27:34', '2026-07-17 11:27:34'),
(18, 'magicadsdark', '1.0', 0, 1, 0, 0, 0, '2026-07-17 11:27:34', '2026-07-17 11:27:34'),
(19, 'magicadscorporate', '1.0', 0, 1, 0, 0, 0, '2026-07-17 11:27:34', '2026-07-17 11:27:34'),
(20, 'magicadsenigma', '1.0', 0, 1, 0, 0, 0, '2026-07-17 11:27:34', '2026-07-17 11:27:34');

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

--
-- Table structure for table `extension_settings`
--

CREATE TABLE `extension_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `saas_feature` tinyint(1) NOT NULL DEFAULT 0,
  `fashion_studio_feature` tinyint(1) NOT NULL DEFAULT 0,
  `fashion_studio_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `fashion_studio_provider` varchar(40) NOT NULL DEFAULT 'gemini',
  `fashion_studio_max_upload_mb` int(10) UNSIGNED NOT NULL DEFAULT 15,
  `fashion_studio_pricing` text DEFAULT NULL,
  `fashion_studio_openai_quality` varchar(10) NOT NULL DEFAULT 'medium',
  `product_photoshoot_feature` tinyint(1) NOT NULL DEFAULT 0,
  `product_photoshoot_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `product_photoshoot_provider` varchar(40) NOT NULL DEFAULT 'gemini',
  `product_photoshoot_max_upload_mb` int(10) UNSIGNED NOT NULL DEFAULT 20,
  `product_photoshoot_pricing` text DEFAULT NULL,
  `product_photoshoot_openai_quality` varchar(10) NOT NULL DEFAULT 'medium',
  `gift_cards_feature` tinyint(1) NOT NULL DEFAULT 0,
  `coupons_feature` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `avatar_studio_feature` tinyint(1) NOT NULL DEFAULT 0,
  `avatar_studio_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `heygen_api_key` text DEFAULT NULL,
  `avatar_studio_translate_mode` varchar(12) NOT NULL DEFAULT 'speed',
  `avatar_studio_max_upload_mb` int(10) UNSIGNED NOT NULL DEFAULT 50,
  `avatar_studio_pricing` text DEFAULT NULL,
  `ugc_factory_feature` tinyint(1) NOT NULL DEFAULT 0,
  `ugc_factory_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `fal_api_key` text DEFAULT NULL,
  `ugc_factory_render_mode` varchar(12) NOT NULL DEFAULT 'quality',
  `ugc_factory_max_upload_mb` int(10) UNSIGNED NOT NULL DEFAULT 10,
  `ugc_factory_pricing` text DEFAULT NULL,
  `elevenlabs_api_key` text DEFAULT NULL,
  `team_feature` tinyint(1) NOT NULL DEFAULT 0,
  `team_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `prompt_marketplace_feature` tinyint(1) NOT NULL DEFAULT 0,
  `prompt_marketplace_commission` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `prompt_marketplace_min_withdrawal` decimal(8,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `extension_settings`
--

INSERT INTO `extension_settings` (`id`, `saas_feature`, `fashion_studio_feature`, `fashion_studio_free_tier`, `fashion_studio_provider`, `fashion_studio_max_upload_mb`, `fashion_studio_pricing`, `fashion_studio_openai_quality`, `product_photoshoot_feature`, `product_photoshoot_free_tier`, `product_photoshoot_provider`, `product_photoshoot_max_upload_mb`, `product_photoshoot_pricing`, `product_photoshoot_openai_quality`, `gift_cards_feature`, `coupons_feature`, `created_at`, `updated_at`, `avatar_studio_feature`, `avatar_studio_free_tier`, `heygen_api_key`, `avatar_studio_translate_mode`, `avatar_studio_max_upload_mb`, `avatar_studio_pricing`, `ugc_factory_feature`, `ugc_factory_free_tier`, `fal_api_key`, `ugc_factory_render_mode`, `ugc_factory_max_upload_mb`, `ugc_factory_pricing`, `elevenlabs_api_key`, `team_feature`, `team_free_tier`, `prompt_marketplace_feature`, `prompt_marketplace_commission`, `prompt_marketplace_min_withdrawal`) VALUES
(1, 1, 0, 0, 'gemini', 15, NULL, 'medium', 0, 0, 'gemini', 20, NULL, 'medium', 0, 0, NULL, NULL, 0, 0, NULL, 'speed', 50, NULL, 0, 0, NULL, 'quality', 10, NULL, NULL, 0, 0, 0, 0, 0.00);

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

--
-- 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 `faqs`
--

CREATE TABLE `faqs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `question` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `answer` longtext NOT 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 `fashion_studio_assets`
--

CREATE TABLE `fashion_studio_assets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `kind` varchar(20) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `image_path` varchar(255) NOT NULL,
  `source` varchar(20) NOT NULL DEFAULT 'uploaded',
  `is_favorite` tinyint(1) 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;

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

--
-- Table structure for table `fashion_studio_photoshoots`
--

CREATE TABLE `fashion_studio_photoshoots` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(40) NOT NULL DEFAULT 'photoshoot',
  `title` varchar(255) DEFAULT NULL,
  `prompt` text DEFAULT NULL,
  `provider` varchar(40) NOT NULL DEFAULT 'gemini',
  `source_files` text DEFAULT NULL,
  `result_path` varchar(255) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'completed',
  `is_video` tinyint(1) NOT NULL DEFAULT 0,
  `is_favorite` tinyint(1) NOT NULL DEFAULT 0,
  `meta` text 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 `fashion_studio_wardrobe_items`
--

CREATE TABLE `fashion_studio_wardrobe_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `category` varchar(60) DEFAULT NULL,
  `image_path` varchar(255) NOT NULL,
  `source` varchar(20) NOT NULL DEFAULT 'uploaded',
  `description` text DEFAULT NULL,
  `is_favorite` tinyint(1) 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;

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

--
-- Table structure for table `feature_settings`
--

CREATE TABLE `feature_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `image_studio_feature` tinyint(1) DEFAULT 1,
  `video_studio_feature` tinyint(1) DEFAULT 1,
  `copy_studio_feature` tinyint(1) DEFAULT 1,
  `image_studio_free_tier` tinyint(1) DEFAULT 1,
  `video_studio_free_tier` tinyint(1) DEFAULT 1,
  `copy_studio_free_tier` tinyint(1) DEFAULT 1,
  `default_image_model` varchar(255) DEFAULT NULL,
  `default_video_model` varchar(255) DEFAULT NULL,
  `default_copy_engine` varchar(255) 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 `feature_settings`
--

INSERT INTO `feature_settings` (`id`, `image_studio_feature`, `video_studio_feature`, `copy_studio_feature`, `image_studio_free_tier`, `video_studio_free_tier`, `copy_studio_free_tier`, `default_image_model`, `default_video_model`, `default_copy_engine`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 1, 1, 1, NULL, NULL, NULL, '2026-07-17 03:08:43', '2026-07-17 03:08:43');

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

--
-- Table structure for table `finance_settings`
--

CREATE TABLE `finance_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `currency` char(3) NOT NULL DEFAULT 'USD',
  `tax` smallint(5) UNSIGNED DEFAULT NULL,
  `billing_info` tinyint(1) NOT NULL DEFAULT 0,
  `decimal_points` tinyint(1) 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 `finance_settings`
--

INSERT INTO `finance_settings` (`id`, `currency`, `tax`, `billing_info`, `decimal_points`, `created_at`, `updated_at`) VALUES
(1, 'USD', NULL, 0, 0, '2026-07-17 03:08:43', '2026-07-17 03:08:43');

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

--
-- Table structure for table `frontend_settings`
--

CREATE TABLE `frontend_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `frontend_page` tinyint(1) NOT NULL DEFAULT 1,
  `custom_url_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `custom_url` varchar(255) DEFAULT NULL,
  `custom_css_url` varchar(255) DEFAULT NULL,
  `custom_js_url` varchar(255) DEFAULT NULL,
  `custom_header_code` text DEFAULT NULL,
  `custom_body_code` text DEFAULT NULL,
  `twitter` varchar(100) DEFAULT NULL,
  `facebook` varchar(100) DEFAULT NULL,
  `linkedin` varchar(100) DEFAULT NULL,
  `instagram` varchar(100) DEFAULT NULL,
  `youtube` varchar(100) DEFAULT NULL,
  `tiktok` varchar(100) 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 `gateways`
--

CREATE TABLE `gateways` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `prepaid_plans` tinyint(1) NOT NULL DEFAULT 0,
  `subscription_plans` tinyint(1) NOT NULL DEFAULT 0,
  `live_api_key` varchar(255) DEFAULT NULL,
  `live_api_secret` varchar(255) DEFAULT NULL,
  `sandbox_api_key` varchar(255) DEFAULT NULL,
  `sandbox_api_secret` varchar(255) DEFAULT NULL,
  `base_url` varchar(255) DEFAULT NULL,
  `webhook_url` varchar(255) DEFAULT NULL,
  `webhook_secret` varchar(255) DEFAULT NULL,
  `merchant_id` varchar(255) DEFAULT NULL,
  `instructions` text DEFAULT NULL,
  `requisities` text DEFAULT NULL,
  `sandbox` tinyint(1) 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 `gateways`
--

INSERT INTO `gateways` (`id`, `name`, `logo`, `status`, `prepaid_plans`, `subscription_plans`, `live_api_key`, `live_api_secret`, `sandbox_api_key`, `sandbox_api_secret`, `base_url`, `webhook_url`, `webhook_secret`, `merchant_id`, `instructions`, `requisities`, `sandbox`, `created_at`, `updated_at`) VALUES
(1, 'paypal', 'assets/img/payments/paypal.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(2, 'stripe', 'assets/img/payments/stripe.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(3, 'banktransfer', 'assets/img/payments/bank-transfer.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(4, 'paystack', 'assets/img/payments/paystack.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(5, 'razorpay', 'assets/img/payments/razorpay.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(6, 'braintree', 'assets/img/payments/braintree.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(7, 'mollie', 'assets/img/payments/mollie.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(8, 'coinbase', 'assets/img/payments/coinbase.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(9, 'midtrans', 'assets/img/payments/midtrans.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(10, 'flutterwave', 'assets/img/payments/flutterwave.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(11, 'yookassa', 'assets/img/payments/yookassa.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(12, 'paddle', 'assets/img/payments/paddle.jpg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(13, 'mercadopago', 'assets/img/payments/mercadopago.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(14, 'twocheckout', 'assets/img/payments/twocheckout.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(15, 'iyzico', 'assets/img/payments/iyzico.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(16, 'robokassa', 'assets/img/payments/robokassa.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(17, 'paytm', 'assets/img/payments/paytm.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(18, 'alipay', 'assets/img/payments/paytm.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(19, 'wepay', 'assets/img/payments/wepay.svg', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(20, 'coinremitter', 'assets/img/payments/coinremitter.avif', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(21, 'wallet', 'assets/img/payments/wallet.avif', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21'),
(22, 'awdpay', 'assets/img/payments/awdpay.png', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-07-17 03:08:43', '2026-07-17 11:04:21');

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

--
-- Table structure for table `general_settings`
--

CREATE TABLE `general_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `languages` text DEFAULT NULL,
  `default_language` varchar(255) DEFAULT NULL,
  `logo_frontend` varchar(255) NOT NULL DEFAULT 'uploads/logo/logo_frontend.png',
  `logo_frontend_collapsed` varchar(255) NOT NULL DEFAULT 'uploads/logo/logo_frontend_collapsed.png',
  `logo_favicon` varchar(255) NOT NULL DEFAULT 'uploads/logo/favicon.ico',
  `logo_dashboard_light` varchar(255) NOT NULL DEFAULT 'uploads/logo/logo_dashboard_light.png',
  `logo_dashboard_dark` varchar(255) NOT NULL DEFAULT 'uploads/logo/logo_dashboard_dark.png',
  `logo_dashboard_collapsed_light` varchar(255) NOT NULL DEFAULT 'uploads/logo/logo_dashboard_collapsed_light.png',
  `logo_dashboard_collapsed_dark` varchar(255) NOT NULL DEFAULT 'uploads/logo/logo_dashboard_collapsed_dark.png',
  `frontend_theme` varchar(255) NOT NULL DEFAULT 'default',
  `dashboard_theme` varchar(255) NOT NULL DEFAULT 'default',
  `user_registration` tinyint(1) NOT NULL DEFAULT 1,
  `user_registration_subscription` tinyint(1) NOT NULL DEFAULT 0,
  `email_verification` tinyint(1) NOT NULL DEFAULT 0,
  `default_theme` varchar(255) DEFAULT 'light',
  `google_recaptcha` tinyint(1) NOT NULL DEFAULT 0,
  `google_analytics_homepage` tinyint(1) NOT NULL DEFAULT 0,
  `google_analytics_dashboard` tinyint(1) NOT NULL DEFAULT 0,
  `google_maps` tinyint(1) NOT NULL DEFAULT 0,
  `live_chat_tawk` tinyint(1) NOT NULL DEFAULT 0,
  `license_type` varchar(255) DEFAULT NULL,
  `license` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `default_credits` int(11) DEFAULT 0,
  `default_storage` varchar(40) NOT NULL DEFAULT 'local',
  `free_tier_project_limit` smallint(5) UNSIGNED DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `free_tier_team_members` smallint(5) UNSIGNED DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_settings`
--

INSERT INTO `general_settings` (`id`, `languages`, `default_language`, `logo_frontend`, `logo_frontend_collapsed`, `logo_favicon`, `logo_dashboard_light`, `logo_dashboard_dark`, `logo_dashboard_collapsed_light`, `logo_dashboard_collapsed_dark`, `frontend_theme`, `dashboard_theme`, `user_registration`, `user_registration_subscription`, `email_verification`, `default_theme`, `google_recaptcha`, `google_analytics_homepage`, `google_analytics_dashboard`, `google_maps`, `live_chat_tawk`, `license_type`, `license`, `username`, `default_credits`, `default_storage`, `free_tier_project_limit`, `created_at`, `updated_at`, `free_tier_team_members`) VALUES
(1, NULL, NULL, 'uploads/logo/logo_frontend.png', 'uploads/logo/logo_frontend_collapsed.png', 'uploads/logo/favicon.ico', 'uploads/logo/logo_dashboard_light.png', 'uploads/logo/logo_dashboard_dark.png', 'uploads/logo/logo_dashboard_collapsed_light.png', 'uploads/logo/logo_dashboard_collapsed_dark.png', 'default', 'default', 1, 0, 0, 'light', 0, 0, 0, 0, 0, 'Extended License', '22abfc2a-5681-417b-ae04-2cd08c2e6f5a', 'ksdeotot30', 0, 'local', 0, '2026-07-17 11:25:17', '2026-07-17 11:26:53', 0);

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

--
-- Table structure for table `gift_cards`
--

CREATE TABLE `gift_cards` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `max_redemptions` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `redeemed_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `per_user_limit` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `owner_id` bigint(20) UNSIGNED DEFAULT NULL,
  `batch_id` varchar(40) DEFAULT NULL,
  `valid_from` timestamp NULL DEFAULT NULL,
  `valid_until` timestamp NULL DEFAULT NULL,
  `note` text 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 `gift_card_redemptions`
--

CREATE TABLE `gift_card_redemptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `gift_card_id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `redeemed_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;

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

--
-- Table structure for table `gift_card_transfers`
--

CREATE TABLE `gift_card_transfers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `transfer_id` varchar(40) NOT NULL,
  `gift_card_id` bigint(20) UNSIGNED NOT NULL,
  `sender_id` bigint(20) UNSIGNED NOT NULL,
  `receiver_id` bigint(20) UNSIGNED NOT 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 `google_adsense`
--

CREATE TABLE `google_adsense` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 0,
  `publisher_id` varchar(255) DEFAULT NULL,
  `auto_ads` tinyint(1) NOT NULL DEFAULT 0,
  `slot_home_top` varchar(255) DEFAULT NULL,
  `slot_home_bottom` varchar(255) DEFAULT NULL,
  `slot_blog_top` varchar(255) DEFAULT NULL,
  `slot_blog_article` varchar(255) DEFAULT NULL,
  `slot_blog_bottom` varchar(255) 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 `invoice_settings`
--

CREATE TABLE `invoice_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `company` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `vat_number` varchar(50) 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 `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 `media_models`
--

CREATE TABLE `media_models` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `vendor` varchar(255) NOT NULL,
  `label` varchar(255) NOT NULL,
  `sub_label` varchar(255) DEFAULT NULL,
  `model_id` varchar(255) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `driver` varchar(255) NOT NULL,
  `key_field` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `tags` text DEFAULT NULL,
  `tier` varchar(255) DEFAULT NULL,
  `audio` tinyint(1) NOT NULL DEFAULT 0,
  `durations` text DEFAULT NULL,
  `max_duration` int(10) UNSIGNED DEFAULT NULL,
  `credit_cost` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `text_rendering` varchar(255) DEFAULT NULL,
  `max_resolution` int(10) UNSIGNED DEFAULT NULL,
  `icon_svg` text DEFAULT NULL,
  `recommended` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `image_quality` varchar(255) DEFAULT 'medium',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `api_provider` varchar(255) DEFAULT NULL,
  `provider_settings` text DEFAULT NULL,
  `resolutions` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `media_models`
--

INSERT INTO `media_models` (`id`, `vendor`, `label`, `sub_label`, `model_id`, `type`, `driver`, `key_field`, `description`, `tags`, `tier`, `audio`, `durations`, `max_duration`, `credit_cost`, `text_rendering`, `max_resolution`, `icon_svg`, `recommended`, `is_active`, `sort_order`, `image_quality`, `created_at`, `updated_at`, `api_provider`, `provider_settings`, `resolutions`) VALUES
(1, 'gemini', 'Google Nano Banana 2', 'Gemini 3.1 Flash Image · 4K', 'gemini-3.1-flash-image', 'image', 'App\\Services\\AiStudio\\Drivers\\GeminiDriver', 'gemini_key', 'Best overall realism with character consistency, native 4K output, and strong editing. Default for ads with photoreal subjects or multilingual text.', '[\"Top realism\",\"4K\",\"Editing\",\"Multilingual text\"]', 'premium', 0, NULL, NULL, 2, 'best', 4096, '<path d=\"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z\"/><path d=\"M20 3v4\"/><path d=\"M22 5h-4\"/><path d=\"M4 17v2\"/><path d=\"M5 18H3\"/>', 1, 1, 10, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(2, 'openai', 'OpenAI GPT Image 2', 'gpt-image-2 · 99% text accuracy', 'gpt-image-2', 'image', 'App\\Services\\AiStudio\\Drivers\\GptImageDriver', 'openai_key', 'Quality-first model with the most reliable English text rendering and high-fidelity edits. Best for portrait photoreal and English headline ads.', '[\"English text\",\"Photoreal\",\"Editing\",\"Up to 4K\"]', 'premium', 0, NULL, NULL, 2, 'best', 4096, '<path d=\"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z\"/><path d=\"M9 13a4.5 4.5 0 0 0 3-4\"/><path d=\"M6.003 5.125A3 3 0 0 0 6.401 6.5\"/><path d=\"M3.477 10.896a4 4 0 0 1 .585-.396\"/><path d=\"M6 18a4 4 0 0 1-1.967-.516\"/><path d=\"M12 13h4\"/><path d=\"M12 18h6a2 2 0 0 1 2 2v1\"/><path d=\"M12 8h8\"/><path d=\"M16 8V5a2 2 0 0 1 2-2\"/><circle cx=\"16\" cy=\"13\" r=\".5\"/><circle cx=\"18\" cy=\"3\" r=\".5\"/><circle cx=\"20\" cy=\"21\" r=\".5\"/><circle cx=\"20\" cy=\"8\" r=\".5\"/>', 0, 1, 20, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(3, 'flux', 'FLUX.2 Pro', 'Black Forest Labs · Multi-reference', 'flux-2-pro', 'image', 'App\\Services\\AiStudio\\Drivers\\FluxDriver', 'flux_key', 'Multi-reference conditioning (up to 8 source images) for character + brand consistency, photoreal at 4MP, deterministic outputs. Replaces Stable Diffusion as the open-weight-adjacent workhorse.', '[\"Multi-reference\",\"Photoreal\",\"4MP\",\"Brand consistency\"]', 'mid', 0, NULL, NULL, 1, 'good', 2048, '<path d=\"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z\"/><path d=\"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12\"/><path d=\"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17\"/>', 0, 1, 30, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(4, 'ideogram', 'Ideogram 3.0', 'Typography specialist', 'ideogram-v3', 'image', 'App\\Services\\AiStudio\\Drivers\\IdeogramDriver', 'ideogram_key', 'The undisputed leader for in-image text. ~90% text accuracy on legibility benchmarks. Best for posters, sale graphics, infographics, and ads with bold headlines.', '[\"Typography\",\"Posters\",\"Sale graphics\",\"Headlines\"]', 'mid', 0, NULL, NULL, 1, 'best', 2048, '<polyline points=\"4 7 4 4 20 4 20 7\"/><line x1=\"9\" x2=\"15\" y1=\"20\" y2=\"20\"/><line x1=\"12\" x2=\"12\" y1=\"4\" y2=\"20\"/>', 0, 1, 40, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(5, 'recraft', 'Recraft V3', 'Vector + brand asset specialist', 'recraft-v3', 'image', 'App\\Services\\AiStudio\\Drivers\\RecraftDriver', 'recraft_key', 'Trained on logo, icon and poster data with native vector (SVG) output and brand-style consistency. Best for flat design, logo concepts and icon work.', '[\"Vectors\",\"Logos\",\"Flat design\",\"Brand assets\"]', 'mid', 0, NULL, NULL, 1, 'good', 2048, '<path d=\"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><circle cx=\"17.5\" cy=\"17.5\" r=\"3.5\"/>', 0, 1, 50, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(6, 'veo', 'Google Veo 3.1', 'Gemini API · Native audio', 'veo-3.1-generate-preview', 'video', 'App\\Services\\AiStudio\\Drivers\\VeoDriver', 'gemini_key', 'Film-grade 1080p with native synchronised audio, dialogue and ambience in a single pass. Best default for ads with on-camera speech.', '[\"Native audio\",\"Dialogue\",\"1080p\",\"I2V\"]', 'premium', 1, '[4,6,8]', 8, 12, 'native', NULL, '<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"/><path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\"/><path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\"/>', 1, 1, 60, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(7, 'runway', 'Runway Gen-4 Turbo', 'Runway · Consistency & VFX', 'gen4_turbo', 'video', 'App\\Services\\AiStudio\\Drivers\\RunwayDriver', 'runway_key', 'Strongest character + product consistency across multiple shots, with the best VFX/editing toolset. Best for UGC, handheld and brand films.', '[\"Consistency\",\"UGC\",\"Cinematic\",\"I2V\"]', 'premium', 0, '[5,10]', 10, 10, 'weak', NULL, '<path d=\"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z\"/><path d=\"m6.2 5.3 3.1 3.9\"/><path d=\"m12.4 3.4 3.1 4\"/><path d=\"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z\"/>', 0, 1, 70, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL),
(8, 'kling', 'Kling 3.0 Pro', 'Kuaishou · Native audio', 'fal-ai/kling-video/v3/pro', 'video', 'App\\Services\\AiStudio\\Drivers\\KlingDriver', 'fal_key', 'Cinematic-quality leader, powered by your choice of the Kling AI API, fal.ai or kie.ai. Best at human motion, orbit/360° product shots and complex camera moves, with native audio and multi-shot support. Clips from 3s up to 15s.', '[\"Orbit\",\"Human motion\",\"Native audio\",\"Multi-shot\"]', 'premium', 1, '[4,5,6,8,10,12,15]', 15, 10, 'weak', NULL, '<circle cx=\"12\" cy=\"12\" r=\"3\"/><circle cx=\"19\" cy=\"5\" r=\"2\"/><circle cx=\"5\" cy=\"19\" r=\"2\"/><path d=\"M10.4 21.9a10 10 0 0 0 9.941-15.416\"/><path d=\"M13.5 2.1a10 10 0 0 0-9.841 15.416\"/>', 0, 1, 80, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', 'fal', '{\"klingai\":{\"label\":\"Kling AI (Direct)\",\"key_field\":\"kling_key\",\"model_id\":\"kling-v3\"},\"fal\":{\"label\":\"fal.ai\",\"model_id\":\"fal-ai\\/kling-video\\/v3\",\"key_field\":\"fal_key\"},\"kie\":{\"label\":\"kie.ai\",\"key_field\":\"kie_key\",\"model_id\":\"kling-3.0\\/video\"}}', '{\"720p\":{\"enabled\":true,\"credit_cost\":6},\"1080p\":{\"enabled\":true,\"credit_cost\":10},\"4k\":{\"enabled\":false,\"credit_cost\":20}}'),
(9, 'seedance', 'Seedance 2.0', 'ByteDance · Native audio', 'bytedance/seedance-2.0', 'video', 'App\\Services\\AiStudio\\Drivers\\SeedanceDriver', 'fal_key', 'ByteDance\'s second-generation video model, powered by your choice of the ByteDance API, fal.ai or kie.ai. Native synchronized audio, multi-shot editing and director-level camera control. Great for high-energy promos and dynamic, motion-graphic-leaning content.', '[\"Native audio\",\"Motion graphics\",\"Energetic\",\"Multi-shot\"]', 'budget', 1, '[4,5,6,8,10,12,15]', 15, 4, 'weak', NULL, '<path d=\"M13 2 3 14h9l-1 8 10-12h-9l1-8z\"/>', 0, 1, 90, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', 'fal', '{\"bytedance\":{\"label\":\"ByteDance (Direct)\",\"key_field\":\"seedance_key\",\"model_id\":\"doubao-seedance-2-0-260128\"},\"fal\":{\"label\":\"fal.ai\",\"key_field\":\"fal_key\",\"model_id\":\"bytedance\\/seedance-2.0\"},\"kie\":{\"label\":\"kie.ai\",\"key_field\":\"kie_key\",\"model_id\":\"bytedance\\/seedance-2\"}}', '{\"480p\":{\"enabled\":true,\"credit_cost\":2},\"720p\":{\"enabled\":true,\"credit_cost\":4},\"1080p\":{\"enabled\":true,\"credit_cost\":7},\"4k\":{\"enabled\":false,\"credit_cost\":14}}'),
(10, 'veo-lite', 'Veo 3.1 Lite', 'Gemini API · Cheap iterations', 'veo-3.1-fast-generate-preview', 'video', 'App\\Services\\AiStudio\\Drivers\\VeoDriver', 'gemini_key', 'Faster, cheaper Veo tier for quick iterations and atmospheric clips. Same engine, lower fidelity + shorter generation time.', '[\"Fast\",\"Native audio\",\"Iteration\",\"Budget\"]', 'budget', 1, '[4,6,8]', 8, 6, 'native', NULL, '<path d=\"m12 14 4-4\"/><path d=\"M3.34 19a10 10 0 1 1 17.32 0\"/>', 0, 1, 100, 'medium', '2026-07-17 03:08:43', '2026-07-17 03:08:43', NULL, NULL, NULL);

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

--
-- 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, '2026_01_02_104629_create_email_settings_table', 1),
(5, '2026_01_02_130018_create_general_settings_table', 1),
(6, '2026_01_02_200311_create_social_media_settings_table', 1),
(7, '2026_01_03_131359_create_admin_keys_table', 1),
(8, '2026_01_07_055714_create_support_tickets_table', 1),
(9, '2026_01_07_060001_create_support_messages_table', 1),
(10, '2026_02_10_140613_create_seo_settings_table', 1),
(11, '2026_02_10_165452_create_cookie_settings_table', 1),
(12, '2026_02_10_221052_create_frontend_settings_table', 1),
(13, '2026_02_13_235931_create_orders_table', 1),
(14, '2026_02_15_165016_create_plans_table', 1),
(15, '2026_02_15_195648_create_subscribers_table', 1),
(16, '2026_02_25_220212_create_finance_settings_table', 1),
(17, '2026_03_05_155537_create_gateways_table', 1),
(18, '2026_03_06_083009_create_invoice_settings_table', 1),
(19, '2026_03_06_232604_create_notifications_table', 1),
(20, '2026_03_08_180539_create_referrals_table', 1),
(21, '2026_03_08_194005_create_payouts_table', 1),
(22, '2026_03_10_140324_create_referral_configurations_table', 1),
(23, '2026_03_19_120525_create_permission_tables', 1),
(24, '2026_04_25_000001_create_ad_creatives_table', 1),
(25, '2026_04_25_000002_create_brand_kits_table', 1),
(26, '2026_05_03_173909_create_extensions_table', 1),
(27, '2026_05_05_193143_create_feature_settings_table', 1),
(28, '2026_05_06_000001_create_brands_table', 1),
(29, '2026_05_06_000002_create_ad_copies_table', 1),
(30, '2026_05_14_100001_create_blog_posts_table', 1),
(31, '2026_05_14_100002_create_blog_comments_table', 1),
(32, '2026_05_29_202652_create_media_models_table', 1),
(33, '2026_05_30_000001_create_text_models_table', 1),
(34, '2026_05_31_000001_create_faqs_table', 1),
(35, '2026_05_31_000002_create_testimonials_table', 1),
(36, '2026_05_31_000003_create_google_adsense_table', 1),
(37, '2026_05_31_000004_create_page_settings_table', 1),
(38, '2026_06_08_200840_create_extension_settings_table', 1),
(39, '2026_06_09_204905_create_pulse_tables', 1),
(40, '2026_06_12_000001_create_prompts_table', 1),
(41, '2026_06_14_120000_create_fashion_studio_tables', 1),
(42, '2026_06_17_120000_create_product_photoshoot_tables', 1),
(43, '2026_06_19_030000_create_avatar_studio_plugin', 1),
(44, '2026_06_19_030000_create_cloud_storages_and_default_storage', 1),
(45, '2026_06_19_040000_create_avatar_studio_catalog', 1),
(46, '2026_06_20_010000_create_ugc_factory_plugin', 1),
(47, '2026_06_20_020000_create_ugc_factory_voices', 1),
(48, '2026_06_21_000001_create_projects_table', 1),
(49, '2026_06_21_000002_add_project_id_to_ad_copies_and_ad_creatives_table', 1),
(50, '2026_06_23_000001_create_team_plugin', 1),
(51, '2026_06_25_000001_create_prompt_marketplace_plugin', 1),
(52, '2026_06_26_000001_create_prompt_marketplace_withdrawals', 1),
(53, '2026_06_26_000001_create_social_media_studio_settings_table', 1),
(54, '2026_06_26_000002_create_social_media_studio_accounts_table', 1),
(55, '2026_06_26_000003_create_social_media_studio_posts_table', 1),
(56, '2026_06_26_000004_create_social_media_studio_targets_table', 1),
(57, '2026_06_29_000001_create_channel_broadcast_settings_table', 1),
(58, '2026_06_29_000002_create_channel_broadcast_destinations_table', 1),
(59, '2026_06_29_000003_create_channel_broadcasts_table', 1),
(60, '2026_06_29_000004_create_channel_broadcast_targets_table', 1),
(61, '2026_07_02_000001_create_gift_cards_plugin', 1),
(62, '2026_07_03_000001_create_coupons_plugin', 1),
(63, '2026_07_09_000002_add_multi_vendor_fields_to_media_models_table', 1),
(64, '2026_07_09_000003_add_multi_vendor_fields_to_kling_model', 1),
(65, '2026_07_11_000001_create_ad_analytics_settings_table', 1),
(66, '2026_07_11_000002_create_ad_accounts_table', 1),
(67, '2026_07_11_000003_create_ad_metrics_table', 1),
(68, '2026_07_11_000004_create_creative_ad_links_table', 1),
(69, '2026_07_11_000005_create_ad_insights_table', 1);

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

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(3, 'App\\Models\\User', 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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `frequency` varchar(20) DEFAULT NULL COMMENT 'prepaid|monthly|yearly|lifetime',
  `order_id` varchar(50) NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `currency` varchar(10) NOT NULL,
  `type` varchar(50) DEFAULT NULL,
  `gateway_transaction_id` varchar(100) DEFAULT NULL,
  `gateway` varchar(50) NOT NULL,
  `status` varchar(20) NOT NULL COMMENT 'completed|cancelled|declined|failed|pending',
  `plan_name` varchar(100) DEFAULT NULL,
  `valid_until` datetime DEFAULT NULL,
  `invoice` varchar(255) DEFAULT NULL,
  `billing_first_name` varchar(100) DEFAULT NULL,
  `billing_last_name` varchar(100) DEFAULT NULL,
  `billing_email` varchar(150) DEFAULT NULL,
  `billing_phone` varchar(30) DEFAULT NULL,
  `billing_city` varchar(100) DEFAULT NULL,
  `billing_postal_code` varchar(20) DEFAULT NULL,
  `billing_country` varchar(100) DEFAULT NULL,
  `billing_vat_number` varchar(50) DEFAULT NULL,
  `billing_address` varchar(255) DEFAULT NULL,
  `billing_company` varchar(160) DEFAULT NULL,
  `credits` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `payment_proof_path` varchar(255) DEFAULT NULL,
  `payment_proof_uploaded_at` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `coupon` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `page_settings`
--

CREATE TABLE `page_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `privacy_content` longtext DEFAULT NULL,
  `privacy_updated_at` timestamp NULL DEFAULT NULL,
  `terms_content` longtext DEFAULT NULL,
  `terms_updated_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;

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

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `payouts`
--

CREATE TABLE `payouts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `request_id` varchar(20) NOT NULL,
  `user_id` varchar(20) NOT NULL,
  `total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `gateway` varchar(50) DEFAULT NULL,
  `status` enum('pending','approved','declined','paid') NOT NULL DEFAULT 'pending',
  `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 `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT 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 `plans`
--

CREATE TABLE `plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` varchar(20) NOT NULL,
  `name` varchar(255) NOT NULL,
  `price` decimal(15,2) UNSIGNED NOT NULL,
  `currency` char(3) NOT NULL DEFAULT 'USD',
  `status` enum('active','closed','hidden') NOT NULL DEFAULT 'active',
  `plan_type` enum('prepaid','monthly','yearly','lifetime') DEFAULT NULL,
  `description` text DEFAULT NULL,
  `featured` tinyint(1) NOT NULL DEFAULT 0,
  `free` tinyint(1) NOT NULL DEFAULT 0,
  `features` text DEFAULT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `projects` mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
  `order` smallint(5) UNSIGNED DEFAULT NULL,
  `team_members` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `personal_api` tinyint(1) NOT NULL DEFAULT 0,
  `days` smallint(5) UNSIGNED DEFAULT NULL,
  `stripe_plan_id` varchar(100) DEFAULT NULL,
  `paypal_plan_id` varchar(100) DEFAULT NULL,
  `stripe_product_id` varchar(100) DEFAULT NULL,
  `paypal_product_id` varchar(100) DEFAULT NULL,
  `stripe_plan_fp` varchar(64) DEFAULT NULL,
  `paypal_plan_fp` varchar(64) DEFAULT NULL,
  `paystack_plan_id` varchar(100) DEFAULT NULL,
  `paystack_plan_fp` varchar(64) DEFAULT NULL,
  `razorpay_plan_id` varchar(100) DEFAULT NULL,
  `razorpay_plan_fp` varchar(64) DEFAULT NULL,
  `mollie_plan_id` varchar(100) DEFAULT NULL,
  `mollie_plan_fp` varchar(64) DEFAULT NULL,
  `flutterwave_plan_id` varchar(100) DEFAULT NULL,
  `flutterwave_plan_fp` varchar(64) DEFAULT NULL,
  `paddle_product_id` varchar(100) DEFAULT NULL,
  `paddle_plan_id` varchar(100) DEFAULT NULL,
  `paddle_plan_fp` varchar(64) DEFAULT NULL,
  `yookassa_plan_id` varchar(100) DEFAULT NULL,
  `yookassa_plan_fp` varchar(64) DEFAULT NULL,
  `mercadopago_plan_id` varchar(100) DEFAULT NULL,
  `mercadopago_plan_fp` varchar(64) DEFAULT NULL,
  `iyzico_product_id` varchar(100) DEFAULT NULL,
  `iyzico_plan_id` varchar(100) DEFAULT NULL,
  `iyzico_plan_fp` varchar(64) DEFAULT NULL,
  `midtrans_plan_id` varchar(100) DEFAULT NULL,
  `midtrans_plan_fp` varchar(64) DEFAULT NULL,
  `braintree_plan_id` varchar(100) DEFAULT NULL,
  `braintree_plan_fp` varchar(64) DEFAULT NULL,
  `image_studio_feature` tinyint(1) DEFAULT 1,
  `video_studio_feature` tinyint(1) DEFAULT 1,
  `copy_studio_feature` tinyint(1) DEFAULT 1,
  `fashion_studio_feature` tinyint(1) DEFAULT 0,
  `product_photoshoot_feature` tinyint(1) DEFAULT 0,
  `avatar_video_feature` tinyint(1) DEFAULT 0,
  `ugc_creator_feature` tinyint(1) DEFAULT 0,
  `social_media_studio_feature` tinyint(1) DEFAULT 0,
  `channel_broadcast_feature` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `avatar_studio_feature` tinyint(1) DEFAULT 0,
  `ugc_factory_feature` tinyint(1) DEFAULT 0,
  `ad_analytics_feature` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `product_photoshoot_assets`
--

CREATE TABLE `product_photoshoot_assets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `kind` varchar(20) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `image_path` varchar(255) NOT NULL,
  `source` varchar(20) NOT NULL DEFAULT 'uploaded',
  `is_favorite` tinyint(1) 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;

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

--
-- Table structure for table `product_photoshoot_products`
--

CREATE TABLE `product_photoshoot_products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `category` varchar(60) DEFAULT NULL,
  `image_path` varchar(255) NOT NULL,
  `source` varchar(20) NOT NULL DEFAULT 'uploaded',
  `description` text DEFAULT NULL,
  `is_favorite` tinyint(1) 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;

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

--
-- Table structure for table `product_photoshoot_shoots`
--

CREATE TABLE `product_photoshoot_shoots` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(40) NOT NULL DEFAULT 'photoshoot',
  `feature` varchar(40) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `prompt` text DEFAULT NULL,
  `provider` varchar(40) NOT NULL DEFAULT 'gemini',
  `source_files` text DEFAULT NULL,
  `result_path` varchar(255) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'completed',
  `is_favorite` tinyint(1) NOT NULL DEFAULT 0,
  `meta` text 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 `projects`
--

CREATE TABLE `projects` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `brand_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(120) NOT NULL,
  `description` text 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 `project_user`
--

CREATE TABLE `project_user` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `project_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `access` varchar(20) NOT NULL DEFAULT 'viewer',
  `shared_by` 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;

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

--
-- Table structure for table `prompts`
--

CREATE TABLE `prompts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'image',
  `title` varchar(160) NOT NULL,
  `body` text NOT NULL,
  `is_global` tinyint(1) 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 `prompts`
--

INSERT INTO `prompts` (`id`, `user_id`, `type`, `title`, `body`, `is_global`, `created_at`, `updated_at`) VALUES
(1, NULL, 'image', 'Hero Product on Seamless Studio Backdrop', 'A premium product centered on a seamless gradient backdrop transitioning from soft warm beige to muted cream, lit by a large softbox from the upper left for gentle wraparound highlights and a subtle reflection beneath. Shot at a slight three-quarter angle with a shallow depth of field, crisp focus on the label, faint rim light separating the product from the background. Clean negative space at the top for a headline. Professional commercial product photography, ultra sharp, color-accurate, 4K advertising quality.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(2, NULL, 'image', 'Lifestyle Flat Lay with Natural Props', 'A top-down flat lay on a textured oak surface, the product as the hero in the center surrounded by complementary lifestyle props — fresh eucalyptus sprigs, a linen napkin, a ceramic mug, and scattered coffee beans. Soft diffused morning light from the right casting long natural shadows. Warm, earthy color palette with balanced composition and breathing room around the edges. Editorial lifestyle photography, inviting and authentic, magazine-quality styling.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(3, NULL, 'image', 'Bold Color-Block Promo with Price Burst', 'A vibrant color-blocked layout split diagonally between a saturated brand-color field and white, the product floating dynamically in the center with a soft drop shadow. A bold circular \"starburst\" badge in the top-right corner reserved for a discount percentage. High-energy, punchy contrast, modern sans-serif friendly negative space for headline and CTA. Eye-catching retail sale aesthetic, clean vector-style backdrop, crisp studio lighting on the product.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(4, NULL, 'image', 'Floating Product with Dynamic Splash', 'The product suspended mid-air against a deep moody background, surrounded by a dramatic splash of liquid or powder frozen in motion, droplets catching sharp specular highlights. Strong directional key light from the side creating bold contrast and depth, subtle blue-and-amber color contrast in the splash. Sense of energy and freshness, high-speed flash photography look, hyper-detailed, premium beverage or cosmetics advertising style.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(5, NULL, 'image', 'Minimalist Scandinavian Scene', 'A calm minimalist composition with the product placed on a pale plaster pedestal, set against a soft off-white wall. A single arched shadow falls across the background from warm side lighting. Muted neutral palette of bone, sand, and stone with one subtle accent of greenery. Generous negative space, balanced asymmetry, serene and sophisticated mood. Clean modern product photography, soft natural light, understated luxury aesthetic.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(6, NULL, 'image', 'Gradient Tech Glow Showcase', 'A sleek tech product displayed at a hero three-quarter angle on a dark surface, illuminated by an indigo-to-amber gradient glow emanating from behind it. Subtle reflections on a glossy black floor, soft neon rim lighting tracing the product edges, faint floating particles of light in the background. Futuristic premium feel, high contrast, polished and modern. Cinematic product render, sharp detail, advertising-grade lighting.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(7, NULL, 'image', 'Before & After Split Comparison', 'A clean vertical split-screen composition: the left side dim and desaturated representing \"before\", the right side bright, vibrant, and warm representing \"after\", with a crisp dividing line down the center. The product positioned prominently on the \"after\" side bathed in flattering light. Clear visual storytelling of transformation, balanced layout with space for short labels on each side. Polished commercial photography, persuasive and easy to read.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(8, NULL, 'image', 'Outdoor Golden-Hour Lifestyle', 'A person joyfully using the product outdoors during golden hour, warm low sunlight creating a glowing rim around their hair and lens flare in the corner. Blurred natural background of a park or city street with soft bokeh. Candid, authentic expression, shallow depth of field keeping the subject and product in sharp focus. Aspirational lifestyle advertising, warm cinematic color grade, genuine human connection.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(9, NULL, 'image', 'Luxury Dark & Gold Elegance', 'The product presented on a black marble surface with subtle gold veining, lit by a tight pool of warm light that fades into deep shadow at the edges. Delicate gold accents and a faint reflection beneath the product. Rich, opulent, high-end mood with dramatic chiaroscuro lighting. Plenty of dark negative space for elegant typography. Premium luxury brand photography, moody and refined, ultra-detailed.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(10, NULL, 'image', 'Playful Pastel Pop Composition', 'A cheerful composition on a soft pastel pink and lavender background with floating geometric shapes — circles, arcs, and confetti — arranged playfully around the centered product. Bright even lighting, candy-like colors, soft shadows, a fun and youthful energy. Balanced and airy layout with room for a bold headline. Modern social-media-ready advertising aesthetic, vibrant yet clean.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(11, NULL, 'image', 'Ingredient-Forward Fresh Burst', 'The product surrounded by its key natural ingredients arranged in a dynamic arc — fresh fruit slices, herbs, or botanicals — some mid-air as if dropping, droplets of water suspended around them. Bright, fresh, high-key lighting on a clean white-to-mint gradient background. Crisp focus showcasing texture and freshness, appetizing and natural. Premium food, beverage, or skincare advertising photography.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(12, NULL, 'image', 'Urban Street Style Hero', 'A confident model holding or wearing the product against a textured urban backdrop — a graffiti wall or weathered concrete — during overcast diffused daylight. Streetwear aesthetic, slightly desaturated cinematic color grade with cool tones, shallow depth of field. Dynamic off-center composition with the subject looking just past the camera. Bold, edgy, contemporary fashion advertising mood, authentic and aspirational.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(13, NULL, 'image', 'Cozy Warm Interior Mood', 'The product styled within a cozy home interior — on a wooden side table beside a softly glowing lamp, a knit throw blanket, and an out-of-focus warm-lit living room behind. Inviting amber tones, soft window light blending with warm artificial light, gentle shadows. Comfortable, homely, and relatable atmosphere. Lifestyle interior photography with shallow depth of field, warm and welcoming brand feel.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(14, NULL, 'image', 'Macro Texture & Detail Close-Up', 'An extreme macro close-up highlighting the rich texture and craftsmanship of the product — visible material grain, stitching, droplets, or surface finish — with razor-sharp focus on the detail and a creamy blurred falloff. Soft directional lighting that rakes across the surface to emphasize depth and tactility. Intimate, premium, quality-focused mood. High-resolution macro product photography, abstract and striking.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(15, NULL, 'image', 'Floating Geometric Pedestals', 'The product elevated on a floating geometric podium amid a surreal scene of pastel pedestals, arches, and spheres arranged at varying depths. Soft studio lighting with gentle gradient shadows, a dreamy minimal 3D-render aesthetic, harmonious muted color palette. Balanced composition with the product as the clear focal point and ample clean space. Modern, trendy, premium product staging, crisp and polished.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(16, NULL, 'image', 'High-Energy Sports Action', 'A dynamic action shot of an athlete in motion using the product, frozen at the peak of movement with sweat droplets and dust kicked up around them. Dramatic stadium or outdoor lighting with strong rim light, motion-blur streaks in the background conveying speed and power. Bold, intense, adrenaline-charged mood, high contrast and saturated. Athletic performance advertising, cinematic and powerful.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(17, NULL, 'image', 'Clean SaaS / App UI Showcase', 'A modern device mockup — sleek smartphone and laptop — displaying a clean app interface, floating at a slight angle on a soft indigo-to-slate gradient background. Subtle soft shadows beneath the devices, faint floating UI cards and notification bubbles around them suggesting features. Crisp, professional, tech-forward aesthetic with generous space for a headline. Polished SaaS marketing visual, sharp and contemporary.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(18, NULL, 'image', 'Seasonal Festive Celebration', 'The product nestled in a warm festive scene with soft twinkling string lights bokeh in the background, evergreen sprigs, subtle metallic ornaments, and a dusting of faux snow. Cozy warm-and-cool color balance, gentle glowing highlights, celebratory yet tasteful styling. Inviting holiday mood with space reserved for a seasonal offer headline. Premium seasonal campaign photography, magical and warm.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(19, NULL, 'image', 'Monochrome Editorial Statement', 'A striking high-contrast black-and-white editorial composition with the product as a bold focal point, dramatic single-source lighting carving deep shadows and bright highlights. Strong graphic shapes, confident negative space, timeless and sophisticated mood. A single subtle pop of brand color on the product for emphasis. Fine-art advertising photography, minimalist, premium, gallery-worthy.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(20, NULL, 'image', 'Aerial Top-Down Lifestyle Spread', 'A beautifully arranged top-down hero shot of the product surrounded by a curated spread of complementary items, organized in a balanced grid-like composition on a richly textured surface. Even soft daylight with gentle natural shadows, cohesive color story, abundant detail yet uncluttered. Inviting \"knolling\" lifestyle aesthetic with breathing room for branding. Premium editorial flat-lay photography, crisp and stylish.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(21, NULL, 'video', 'Cinematic Product Reveal', 'Open on a dark, moody scene with soft volumetric light beams. The product slowly emerges from shadow, rotating gently as a spotlight sweeps across its surface revealing glossy highlights and fine detail. Subtle particles of light drift through the air. The camera pushes in slowly with shallow depth of field. As the product reaches full light, the brand logo fades in elegantly beneath it, followed by a clean call-to-action. Premium, cinematic, slow and deliberate pacing.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(22, NULL, 'video', 'Fast-Paced Unboxing Sequence', 'A series of quick, snappy close-up shots: hands picking up the package, fingers pulling the seal, the lid lifting to reveal the product inside, glints of light on the packaging. Each cut is tight and satisfying, synced to an upbeat rhythm with subtle whoosh transitions. The final shot pulls back to show the fully unboxed product hero-lit on a clean surface, then the logo and tagline animate in. Energetic, modern, tactile and exciting.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(23, NULL, 'video', 'UGC Selfie Testimonial', 'A relatable everyday person films themselves selfie-style in natural home lighting, smiling and talking enthusiastically to the camera while holding the product. Handheld slightly shaky authentic feel, casual setting like a kitchen or living room. They gesture toward the product, show it close to the lens, and react with genuine delight. Quick zoom-in for emphasis on a key moment. Ends with them giving a thumbs up. Authentic, friendly, social-first UGC style.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(24, NULL, 'video', 'Lifestyle Day-in-the-Life Montage', 'A warm montage following a person through their day seamlessly integrating the product into real moments — morning routine by a sunlit window, commuting through the city, a productive afternoon, a relaxed evening. Smooth match-cuts between scenes, golden natural lighting, candid genuine expressions. The product appears naturally in each beat as a helpful companion. Aspirational yet down-to-earth, warm cinematic color grade, uplifting pacing.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(25, NULL, 'video', 'Dramatic Problem-to-Solution Story', 'Open on a relatable frustration shown in dim, desaturated tones — someone struggling with the problem your product solves, sighing in mild defeat. A beat of tension. Then the product is introduced and the scene instantly brightens, color floods back, and the person\'s expression shifts to relief and joy as they use it effortlessly. Camera moves from static and heavy to dynamic and light. Ends on a satisfied smile with the logo and CTA. Emotional, clear narrative arc.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(26, NULL, 'video', 'Floating Hero with Particle FX', 'The product floats and slowly rotates in the center of a sleek gradient void, suspended weightlessly. Glowing particles and soft light streaks orbit around it, occasionally catching its edges with rim light. The camera arcs smoothly around the product in a 360-style move, revealing every angle. Feature callout text elegantly fades in and out beside the product at key rotations. Ends with the logo lockup. Futuristic, premium, hypnotic and smooth.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(27, NULL, 'video', 'Bold Flash-Sale Countdown', 'High-energy opener: a bold price tag or discount percentage slams into frame with an impact shake and particle burst. Quick rhythmic cuts of the product from multiple angles, each punctuated by snappy graphic wipes in brand colors. A countdown timer ticks urgently in the corner. Text callouts like the offer and deadline pop on screen with kinetic motion. Ends on a strong pulsing call-to-action button. Urgent, punchy, conversion-driven.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(28, NULL, 'video', 'Slow-Motion Sensory Close-Ups', 'A sequence of luxurious slow-motion macro shots emphasizing texture and sensation — liquid pouring and rippling, fabric flowing, droplets landing, light refracting through the product. Each shot lingers, beautifully lit with soft directional light and shallow focus. Rich, tactile, almost meditative pacing. The product is woven throughout as the source of these sensory moments. Concludes with the product hero shot and a refined logo reveal. Elegant and immersive.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(29, NULL, 'video', 'Split-Screen Comparison', 'A clean split-screen runs two scenes side by side: the left showing the dull \"ordinary\" way (desaturated, sluggish), the right showing life with the product (vibrant, smooth, fast). Synchronized actions on both sides highlight the contrast frame by frame. Midway, the divider wipes away and the \"with product\" side takes over the full frame in full color. Ends with the product, a benefit headline, and CTA. Persuasive, clear, visually satisfying.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(30, NULL, 'video', 'Energetic Dance / Trend Hook', 'Open on a confident person in a stylish, well-lit setting bursting into an upbeat, trendy dance move that immediately hooks attention. Quick beat-synced cuts, vibrant colors, dynamic camera that bounces with the rhythm. They incorporate the product playfully into the choreography, showing it off naturally. Text overlay with a catchy hook appears early. High replay-value energy. Ends with the product front and center and a snappy CTA. Fun, viral, social-native.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(31, NULL, 'video', 'Aspirational Brand Anthem', 'A sweeping cinematic montage of inspiring wide shots — vast landscapes, determined people, moments of triumph — intercut with the product appearing as part of the journey. Epic, emotive pacing that builds toward a crescendo. Warm heroic lighting, slow-motion hero moments, a sense of purpose and belonging. Minimal text, letting visuals carry the emotion, before resolving on the brand logo and a powerful tagline. Premium, emotional, brand-building storytelling.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(32, NULL, 'video', 'App Screen Walkthrough', 'A sleek smartphone floats at a slight angle against a soft gradient background, its screen animating through the app\'s key features with smooth UI transitions — tapping, swiping, and results appearing in real time. A finger or cursor guides the journey. Floating callout labels highlight each feature as it appears. Clean, modern, tech-forward look with subtle depth and soft shadows. Ends with the app icon, name, and download CTA. Crisp and professional.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(33, NULL, 'video', 'Cozy ASMR Routine', 'An intimate, softly lit close-up sequence following a calming routine with the product — gentle pouring, soft taps, smooth application, satisfying small actions. Warm ambient lighting, shallow focus, slow and soothing pacing that invites relaxation. Emphasis on tactile, sensory micro-moments. The atmosphere is quiet and comforting. Ends gently with the product resting in frame and a soft logo fade-in. Calming, sensory, premium and inviting.', 1, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(34, NULL, 'video', 'Quick Tutorial in 3 Steps', 'A bright, clear how-to broken into three concise on-screen steps, each introduced by a bold number animating into frame. Clean overhead and close-up shots demonstrate each step simply and clearly with the product. Snappy transitions between steps, friendly and well-lit setting, easy-to-follow pacing. After step three, a satisfying reveal of the finished result. Ends with the product and a CTA. Helpful, approachable, informative and quick.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44'),
(35, NULL, 'video', 'Dramatic Liquid / Splash Showcase', 'Shot in crisp high-speed slow motion, the product is surrounded by dynamic splashes of liquid or bursts of powder erupting and freezing mid-air around it. Droplets catch sharp specular highlights against a deep contrasting background. The camera holds steady as the chaos blooms gracefully, then settles. Bold, fresh, high-impact energy. Resolves on the clean product hero shot with logo and tagline. Striking, premium beverage or cosmetics style.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44'),
(36, NULL, 'video', 'Founder / Behind-the-Scenes Story', 'A warm, documentary-style sequence: the founder or team shown authentically at work — crafting, designing, or testing the product — interspersed with sincere direct-to-camera moments sharing the brand\'s mission. Natural lighting, handheld intimacy, genuine emotion. Real workspace details build trust and authenticity. The product is shown as the result of passion and care. Ends with a heartfelt message, the logo, and CTA. Honest, human, trust-building.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44'),
(37, NULL, 'video', 'Seasonal Holiday Spot', 'A heartwarming festive scene with twinkling lights bokeh, cozy interiors, and gentle falling snow outside the window. Loved ones gather and share a joyful moment, with the product appearing as part of the celebration — a perfect gift or shared experience. Warm-and-cool color balance, soft glowing highlights, tender emotional pacing. A seasonal offer headline appears gracefully. Ends with the logo amid festive sparkle. Magical, warm, emotionally resonant.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44'),
(38, NULL, 'video', 'Punchy Feature Highlight Reel', 'A rapid, high-energy reel cycling through the product\'s top features, each shown in a tight dynamic shot paired with a bold animated text callout. Kinetic transitions — quick zooms, whip pans, and graphic wipes in brand colors — keep momentum high. Upbeat rhythm, vibrant and crisp visuals, every second earning attention. Builds to a final montage flash of all features, then the product, logo, and a strong CTA. Modern, confident, attention-grabbing.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44'),
(39, NULL, 'video', 'Transformation Time-Lapse', 'A satisfying time-lapse capturing a visible transformation powered by the product — a space being organized, a result developing, a project coming together — compressed into smooth accelerated motion. Stable locked-off framing with light naturally shifting to show passage of time. A clear, gratifying before-to-after payoff. The product is present throughout as the catalyst. Ends on the finished result with a benefit headline, logo, and CTA. Impressive and convincing.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44'),
(40, NULL, 'video', 'Testimonial Mashup with B-Roll', 'A dynamic edit weaving together short snippets of happy customers speaking enthusiastically about the product, intercut with crisp b-roll of the product in real use. Warm authentic lighting, genuine smiles and reactions, on-screen captions reinforcing key quotes and star ratings. Upbeat but trustworthy pacing that builds social proof quickly. Closes on a strong combined endorsement, the product, logo, and a confident CTA. Credible, relatable, persuasive.', 1, '2026-07-17 03:08:44', '2026-07-17 03:08:44');

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

--
-- Table structure for table `prompt_favorites`
--

CREATE TABLE `prompt_favorites` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `prompt_id` bigint(20) UNSIGNED NOT 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 `prompt_listings`
--

CREATE TABLE `prompt_listings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `public_id` char(36) NOT NULL,
  `ad_creative_id` bigint(20) UNSIGNED DEFAULT NULL,
  `seller_id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('image','video') NOT NULL,
  `title` varchar(160) NOT NULL,
  `description` varchar(500) DEFAULT NULL,
  `prompt` longtext NOT NULL,
  `generation_meta` text DEFAULT NULL,
  `preview_path` varchar(255) DEFAULT NULL,
  `preview_disk` varchar(20) DEFAULT 'local',
  `mime_type` varchar(50) DEFAULT NULL,
  `width` smallint(5) UNSIGNED DEFAULT NULL,
  `height` smallint(5) UNSIGNED DEFAULT NULL,
  `duration` tinyint(3) UNSIGNED DEFAULT NULL,
  `is_paid` tinyint(1) NOT NULL DEFAULT 1,
  `price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `currency` varchar(3) NOT NULL DEFAULT 'USD',
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `sales_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `revenue_total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `views` 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;

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

--
-- Table structure for table `prompt_purchases`
--

CREATE TABLE `prompt_purchases` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `public_id` char(36) NOT NULL,
  `listing_id` bigint(20) UNSIGNED DEFAULT NULL,
  `buyer_id` bigint(20) UNSIGNED NOT NULL,
  `seller_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` enum('image','video') NOT NULL,
  `title` varchar(160) NOT NULL,
  `prompt` longtext NOT NULL,
  `generation_meta` text DEFAULT NULL,
  `preview_path` varchar(255) DEFAULT NULL,
  `preview_disk` varchar(20) DEFAULT 'local',
  `mime_type` varchar(50) DEFAULT NULL,
  `width` smallint(5) UNSIGNED DEFAULT NULL,
  `height` smallint(5) UNSIGNED DEFAULT NULL,
  `duration` tinyint(3) UNSIGNED DEFAULT NULL,
  `price_paid` decimal(10,2) NOT NULL DEFAULT 0.00,
  `commission_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `seller_earning` decimal(10,2) NOT NULL DEFAULT 0.00,
  `currency` varchar(3) NOT NULL DEFAULT 'USD',
  `gateway` varchar(30) NOT NULL DEFAULT 'wallet',
  `order_reference` varchar(255) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'completed',
  `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 `prompt_withdrawals`
--

CREATE TABLE `prompt_withdrawals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `request_id` varchar(32) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `currency` varchar(3) NOT NULL DEFAULT 'USD',
  `method` varchar(20) NOT NULL DEFAULT 'paypal',
  `destination` text NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `admin_note` varchar(500) DEFAULT NULL,
  `processed_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;

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

--
-- Table structure for table `pulse_aggregates`
--

CREATE TABLE `pulse_aggregates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bucket` int(10) UNSIGNED NOT NULL,
  `period` mediumint(8) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL,
  `key` mediumtext NOT NULL,
  `key_hash` binary(16) GENERATED ALWAYS AS (unhex(md5(`key`))) VIRTUAL,
  `aggregate` varchar(255) NOT NULL,
  `value` decimal(20,2) NOT NULL,
  `count` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pulse_aggregates`
--

INSERT INTO `pulse_aggregates` (`id`, `bucket`, `period`, `type`, `key`, `aggregate`, `value`, `count`) VALUES
(1, 1784257680, 60, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(2, 1784257560, 360, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(3, 1784256480, 1440, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(4, 1784250720, 10080, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(5, 1784257680, 60, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'count', 1.00, NULL),
(6, 1784257560, 360, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'count', 1.00, NULL),
(7, 1784256480, 1440, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'count', 1.00, NULL),
(8, 1784250720, 10080, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'count', 1.00, NULL),
(9, 1784257680, 60, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 24988.00, NULL),
(10, 1784257560, 360, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 24988.00, NULL),
(11, 1784256480, 1440, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 24988.00, NULL),
(12, 1784250720, 10080, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 24988.00, NULL),
(13, 1784257680, 60, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'max', 2293.00, NULL),
(14, 1784257560, 360, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'max', 2293.00, NULL),
(15, 1784256480, 1440, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'max', 2293.00, NULL),
(16, 1784250720, 10080, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 'max', 2293.00, NULL),
(17, 1784270040, 60, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(18, 1784269800, 360, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(19, 1784269440, 1440, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(20, 1784260800, 10080, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(21, 1784270040, 60, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1592.00, NULL),
(22, 1784269800, 360, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1592.00, NULL),
(23, 1784269440, 1440, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1592.00, NULL),
(24, 1784260800, 10080, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1592.00, NULL),
(25, 1784275680, 60, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(26, 1784275560, 360, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(27, 1784275200, 1440, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(28, 1784270880, 10080, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(29, 1784275680, 60, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 2057.00, NULL),
(30, 1784275560, 360, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 2057.00, NULL),
(31, 1784275200, 1440, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 2057.00, NULL),
(32, 1784270880, 10080, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 2057.00, NULL),
(33, 1784277960, 60, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(34, 1784277720, 360, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(35, 1784276640, 1440, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(36, 1784270880, 10080, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(37, 1784277960, 60, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1768.00, NULL),
(38, 1784277720, 360, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1768.00, NULL),
(39, 1784276640, 1440, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1768.00, NULL),
(40, 1784270880, 10080, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1768.00, NULL),
(41, 1784279580, 60, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'count', 1.00, NULL),
(42, 1784279520, 360, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'count', 1.00, NULL),
(43, 1784279520, 1440, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'count', 1.00, NULL),
(44, 1784270880, 10080, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'count', 1.00, NULL),
(45, 1784279580, 60, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'max', 1282.00, NULL),
(46, 1784279520, 360, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'max', 1282.00, NULL),
(47, 1784279520, 1440, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'max', 1282.00, NULL),
(48, 1784270880, 10080, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 'max', 1282.00, NULL),
(49, 1784285220, 60, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(50, 1784284920, 360, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(51, 1784283840, 1440, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(52, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'count', 1.00, NULL),
(53, 1784285220, 60, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1292.00, NULL),
(54, 1784284920, 360, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1292.00, NULL),
(55, 1784283840, 1440, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1292.00, NULL),
(56, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 'max', 1292.00, NULL),
(57, 1784286240, 60, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(58, 1784286000, 360, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(59, 1784285280, 1440, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(60, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'count', 1.00, NULL),
(61, 1784286240, 60, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 1911.00, NULL),
(62, 1784286000, 360, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 1911.00, NULL),
(63, 1784285280, 1440, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 1911.00, NULL),
(64, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 'max', 1911.00, NULL),
(65, 1784287500, 60, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'count', 1.00, NULL),
(66, 1784287440, 360, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'count', 1.00, NULL),
(67, 1784286720, 1440, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'count', 1.00, NULL),
(68, 1784280960, 10080, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'count', 1.00, NULL),
(69, 1784287500, 60, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'max', 2409.00, NULL),
(70, 1784287440, 360, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'max', 2409.00, NULL),
(71, 1784286720, 1440, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'max', 2409.00, NULL),
(72, 1784280960, 10080, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 'max', 2409.00, NULL),
(73, 1784287500, 60, 'user_request', '1', 'count', 5.00, NULL),
(74, 1784287440, 360, 'user_request', '1', 'count', 21.00, NULL),
(75, 1784286720, 1440, 'user_request', '1', 'count', 24.00, NULL),
(76, 1784280960, 10080, 'user_request', '1', 'count', 24.00, NULL),
(77, 1784287500, 60, 'cache_miss', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(78, 1784287440, 360, 'cache_miss', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(79, 1784286720, 1440, 'cache_miss', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(80, 1784280960, 10080, 'cache_miss', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(81, 1784287500, 60, 'cache_hit', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(82, 1784287440, 360, 'cache_hit', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(83, 1784286720, 1440, 'cache_hit', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(84, 1784280960, 10080, 'cache_hit', '3d44f3c2b7826ee3cb47cc604999fca4', 'count', 1.00, NULL),
(85, 1784287500, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'count', 1.00, NULL),
(86, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'count', 1.00, NULL),
(87, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'count', 1.00, NULL),
(88, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'count', 1.00, NULL),
(89, 1784287500, 60, 'slow_user_request', '1', 'count', 4.00, NULL),
(90, 1784287440, 360, 'slow_user_request', '1', 'count', 14.00, NULL),
(91, 1784286720, 1440, 'slow_user_request', '1', 'count', 17.00, NULL),
(92, 1784280960, 10080, 'slow_user_request', '1', 'count', 17.00, NULL),
(97, 1784287500, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'max', 1155.00, NULL),
(98, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'max', 1155.00, NULL),
(99, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'max', 1155.00, NULL),
(100, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 'max', 1155.00, NULL),
(101, 1784287500, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 2.00, NULL),
(102, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 5.00, NULL),
(103, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 6.00, NULL),
(104, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 6.00, NULL),
(113, 1784287500, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 2353.00, NULL),
(114, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 2353.00, NULL),
(115, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 2353.00, NULL),
(116, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 2353.00, NULL),
(117, 1784287500, 60, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'count', 1.00, NULL),
(118, 1784287440, 360, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'count', 1.00, NULL),
(119, 1784286720, 1440, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'count', 1.00, NULL),
(120, 1784280960, 10080, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'count', 1.00, NULL),
(133, 1784287500, 60, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'max', 1141.00, NULL),
(134, 1784287440, 360, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'max', 1141.00, NULL),
(135, 1784286720, 1440, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'max', 1141.00, NULL),
(136, 1784280960, 10080, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 'max', 1141.00, NULL),
(141, 1784287500, 60, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'count', 1.00, NULL),
(142, 1784287440, 360, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'count', 5.00, NULL),
(143, 1784286720, 1440, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'count', 5.00, NULL),
(144, 1784280960, 10080, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'count', 5.00, NULL),
(145, 1784287500, 60, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', 'count', 1.00, NULL),
(146, 1784287440, 360, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', 'count', 9.00, NULL),
(147, 1784286720, 1440, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', 'count', 9.00, NULL),
(148, 1784280960, 10080, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', 'count', 9.00, NULL),
(157, 1784287500, 60, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'max', 1735.00, NULL),
(158, 1784287440, 360, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'max', 4490.00, NULL),
(159, 1784286720, 1440, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'max', 4490.00, NULL),
(160, 1784280960, 10080, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'max', 4490.00, NULL),
(161, 1784287560, 60, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'count', 1.00, NULL),
(162, 1784287560, 60, 'slow_user_request', '1', 'count', 2.00, NULL),
(163, 1784287560, 60, 'user_request', '1', 'count', 5.00, NULL),
(164, 1784287560, 60, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', 'count', 3.00, NULL),
(177, 1784287560, 60, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'max', 1076.00, NULL),
(201, 1784287560, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 1.00, NULL),
(213, 1784287560, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 1576.00, NULL),
(217, 1784287620, 60, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'count', 3.00, NULL),
(218, 1784287620, 60, 'slow_user_request', '1', 'count', 7.00, NULL),
(219, 1784287620, 60, 'user_request', '1', 'count', 10.00, NULL),
(220, 1784287620, 60, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', 'count', 5.00, NULL),
(233, 1784287620, 60, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 'max', 4490.00, NULL),
(277, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 1.00, NULL),
(289, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 1851.00, NULL),
(293, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'count', 1.00, NULL),
(294, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'count', 1.00, NULL),
(295, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'count', 2.00, NULL),
(296, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'count', 2.00, NULL),
(305, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'max', 1038.00, NULL),
(306, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'max', 1038.00, NULL),
(307, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'max', 1170.00, NULL),
(308, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'max', 1170.00, NULL),
(309, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'count', 1.00, NULL),
(310, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'count', 1.00, NULL),
(311, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'count', 1.00, NULL),
(312, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'count', 1.00, NULL),
(321, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'max', 3350.00, NULL),
(322, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'max', 3350.00, NULL),
(323, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'max', 3350.00, NULL),
(324, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 'max', 3350.00, NULL),
(325, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'count', 1.00, NULL),
(326, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'count', 1.00, NULL),
(327, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'count', 1.00, NULL),
(328, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'count', 1.00, NULL),
(337, 1784287620, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'max', 1220.00, NULL),
(338, 1784287440, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'max', 1220.00, NULL),
(339, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'max', 1220.00, NULL),
(340, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 'max', 1220.00, NULL),
(361, 1784287680, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 1.00, NULL),
(362, 1784287680, 60, 'slow_user_request', '1', 'count', 1.00, NULL),
(363, 1784287680, 60, 'user_request', '1', 'count', 1.00, NULL),
(373, 1784287680, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 1693.00, NULL),
(375, 1784287860, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'count', 1.00, NULL),
(376, 1784287800, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'count', 1.00, NULL),
(377, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'count', 1.00, NULL),
(378, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'count', 1.00, NULL),
(379, 1784287860, 60, 'slow_user_request', '1', 'count', 3.00, NULL),
(380, 1784287800, 360, 'slow_user_request', '1', 'count', 3.00, NULL),
(381, 1784287860, 60, 'user_request', '1', 'count', 3.00, NULL),
(382, 1784287800, 360, 'user_request', '1', 'count', 3.00, NULL),
(387, 1784287860, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'max', 2478.00, NULL),
(388, 1784287800, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'max', 2478.00, NULL),
(389, 1784286720, 1440, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'max', 2478.00, NULL),
(390, 1784280960, 10080, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 'max', 2478.00, NULL),
(391, 1784287860, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 1.00, NULL),
(392, 1784287800, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'count', 1.00, NULL),
(403, 1784287860, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 1623.00, NULL),
(404, 1784287800, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 'max', 1623.00, NULL),
(407, 1784287860, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'count', 1.00, NULL),
(408, 1784287800, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'count', 1.00, NULL),
(419, 1784287860, 60, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'max', 1170.00, NULL),
(420, 1784287800, 360, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 'max', 1170.00, NULL);

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

--
-- Table structure for table `pulse_entries`
--

CREATE TABLE `pulse_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `timestamp` int(10) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL,
  `key` mediumtext NOT NULL,
  `key_hash` binary(16) GENERATED ALWAYS AS (unhex(md5(`key`))) VIRTUAL,
  `value` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pulse_entries`
--

INSERT INTO `pulse_entries` (`id`, `timestamp`, `type`, `key`, `value`) VALUES
(1, 1784257699, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 24988),
(2, 1784257701, 'slow_query', '[\"alter table `support_tickets` add unique `support_tickets_ticket_id_unique`(`ticket_id`)\",\"database\\/migrations\\/2026_01_07_055714_create_support_tickets_table.php:14\"]', 2293),
(3, 1784270066, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 1592),
(4, 1784275682, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 2057),
(5, 1784277988, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 1768),
(6, 1784279580, 'slow_request', '[\"GET\",\"\\/login\",\"Laravel\\\\Fortify\\\\Http\\\\Controllers\\\\AuthenticatedSessionController@create\"]', 1282),
(7, 1784285246, 'slow_request', '[\"GET\",\"\\/\",\"App\\\\Http\\\\Controllers\\\\PageController@home\"]', 1292),
(8, 1784286259, 'slow_request', '[\"GET\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activation\"]', 1911),
(9, 1784287515, 'slow_request', '[\"POST\",\"\\/install\\/activation\",\"App\\\\Http\\\\Controllers\\\\Admin\\\\InstallController@activateApplication\"]', 2409),
(10, 1784287527, 'user_request', '1', NULL),
(11, 1784287527, 'cache_miss', '3d44f3c2b7826ee3cb47cc604999fca4', NULL),
(12, 1784287528, 'cache_hit', '3d44f3c2b7826ee3cb47cc604999fca4', NULL),
(13, 1784287528, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/dashboard\",\"App\\\\Livewire\\\\Admin\\\\Dashboard\\\\AdminDashboard\"]', 1155),
(14, 1784287528, 'slow_user_request', '1', NULL),
(15, 1784287528, 'user_request', '1', NULL),
(16, 1784287533, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 2353),
(17, 1784287533, 'slow_user_request', '1', NULL),
(18, 1784287533, 'user_request', '1', NULL),
(19, 1784287550, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 2144),
(20, 1784287550, 'slow_user_request', '1', NULL),
(21, 1784287550, 'user_request', '1', NULL),
(22, 1784287551, 'slow_outgoing_request', '[\"POST\",\"https:\\/\\/marketplace.berkine.net\\/api\\/magicads\\/extension\"]', 1141),
(23, 1784287559, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 1735),
(24, 1784287559, 'slow_user_request', '1', NULL),
(25, 1784287559, 'user_request', '1', NULL),
(26, 1784287559, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(27, 1784287568, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 1076),
(28, 1784287568, 'slow_user_request', '1', NULL),
(29, 1784287568, 'user_request', '1', NULL),
(30, 1784287568, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(31, 1784287571, 'user_request', '1', NULL),
(32, 1784287587, 'user_request', '1', NULL),
(33, 1784287587, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(34, 1784287613, 'user_request', '1', NULL),
(35, 1784287613, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(36, 1784287619, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 1576),
(37, 1784287619, 'slow_user_request', '1', NULL),
(38, 1784287619, 'user_request', '1', NULL),
(39, 1784287622, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 4490),
(40, 1784287622, 'slow_user_request', '1', NULL),
(41, 1784287622, 'user_request', '1', NULL),
(42, 1784287622, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(43, 1784287631, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 1290),
(44, 1784287631, 'slow_user_request', '1', NULL),
(45, 1784287631, 'user_request', '1', NULL),
(46, 1784287632, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(47, 1784287635, 'slow_request', '[\"POST\",\"\\/app\\/admin\\/plugins\",\"via \\/livewire-d2372624\\/update\"]', 1192),
(48, 1784287635, 'slow_user_request', '1', NULL),
(49, 1784287635, 'user_request', '1', NULL),
(50, 1784287635, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(51, 1784287645, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 1851),
(52, 1784287645, 'slow_user_request', '1', NULL),
(53, 1784287645, 'user_request', '1', NULL),
(54, 1784287648, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 1038),
(55, 1784287648, 'slow_user_request', '1', NULL),
(56, 1784287648, 'user_request', '1', NULL),
(57, 1784287653, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/themes\",\"App\\\\Livewire\\\\Admin\\\\Themes\\\\Themes\"]', 3350),
(58, 1784287653, 'slow_user_request', '1', NULL),
(59, 1784287653, 'user_request', '1', NULL),
(60, 1784287667, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/general\",\"App\\\\Livewire\\\\Admin\\\\General\\\\GeneralSettings\"]', 1220),
(61, 1784287667, 'slow_user_request', '1', NULL),
(62, 1784287667, 'user_request', '1', NULL),
(63, 1784287672, 'user_request', '1', NULL),
(64, 1784287675, 'user_request', '1', NULL),
(65, 1784287675, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(66, 1784287675, 'user_request', '1', NULL),
(67, 1784287676, 'cache_miss', 'livewire-checksum-failures:116.96.45.77', NULL),
(68, 1784287689, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 1693),
(69, 1784287689, 'slow_user_request', '1', NULL),
(70, 1784287689, 'user_request', '1', NULL),
(71, 1784287883, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/update\",\"App\\\\Livewire\\\\Admin\\\\Update\"]', 2478),
(72, 1784287883, 'slow_user_request', '1', NULL),
(73, 1784287883, 'user_request', '1', NULL),
(74, 1784287902, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\Plugins\"]', 1623),
(75, 1784287902, 'slow_user_request', '1', NULL),
(76, 1784287902, 'user_request', '1', NULL),
(77, 1784287919, 'slow_request', '[\"GET\",\"\\/app\\/admin\\/plugins\\/checkout\\/{slug}\",\"App\\\\Livewire\\\\Admin\\\\Plugins\\\\PluginCheckout\"]', 1170),
(78, 1784287919, 'slow_user_request', '1', NULL),
(79, 1784287919, 'user_request', '1', NULL);

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

--
-- Table structure for table `pulse_values`
--

CREATE TABLE `pulse_values` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `timestamp` int(10) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL,
  `key` mediumtext NOT NULL,
  `key_hash` binary(16) GENERATED ALWAYS AS (unhex(md5(`key`))) VIRTUAL,
  `value` mediumtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `referrals`
--

CREATE TABLE `referrals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `referrer_id` varchar(20) DEFAULT NULL,
  `referrer_email` varchar(191) DEFAULT NULL,
  `referred_id` varchar(20) DEFAULT NULL,
  `referred_email` varchar(191) DEFAULT NULL,
  `rate` tinyint(3) UNSIGNED DEFAULT NULL,
  `order_id` varchar(100) DEFAULT NULL,
  `payment` decimal(10,2) DEFAULT NULL,
  `commission` decimal(10,2) DEFAULT NULL,
  `status` enum('pending','approved','rejected','paid') DEFAULT NULL,
  `gateway` varchar(50) DEFAULT NULL,
  `order_date` 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;

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

--
-- Table structure for table `referral_configurations`
--

CREATE TABLE `referral_configurations` (
  `id` tinyint(3) UNSIGNED NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 0,
  `payment_policy` varchar(10) NOT NULL DEFAULT 'first' COMMENT 'all, first',
  `payment_commission` decimal(5,2) NOT NULL DEFAULT 10.00,
  `payment_threshold` decimal(8,2) NOT NULL DEFAULT 50.00,
  `payment_credits` 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;

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

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

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT 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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'user', 'web', '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(2, 'subscriber', 'web', '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(3, 'admin', 'web', '2026-07-17 03:08:43', '2026-07-17 03:08:43');

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

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `seo_settings`
--

CREATE TABLE `seo_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `home_title` varchar(255) DEFAULT NULL,
  `home_author` varchar(255) DEFAULT NULL,
  `home_url` varchar(255) DEFAULT NULL,
  `home_description` longtext DEFAULT NULL,
  `home_keywords` longtext DEFAULT NULL,
  `login_title` varchar(255) DEFAULT NULL,
  `login_author` varchar(255) DEFAULT NULL,
  `login_url` varchar(255) DEFAULT NULL,
  `login_description` longtext DEFAULT NULL,
  `login_keywords` longtext DEFAULT NULL,
  `register_title` varchar(255) DEFAULT NULL,
  `register_author` varchar(255) DEFAULT NULL,
  `register_url` varchar(255) DEFAULT NULL,
  `register_description` longtext DEFAULT NULL,
  `register_keywords` longtext 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 `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
('Euc0Qs7jixt6FnBranWC27eijyNuHjv1zCtyfRuJ', 1, '116.96.45.77', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoibDR6M0JGV0p3U2V4REY3TlhXRXJwTndObFBTWEI4OFFxOUl6NTU0eiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NzU6Imh0dHBzOi8vYmVsb3Zldm4uY29tL2FwcC9hZG1pbi9wbHVnaW5zL2NoZWNrb3V0L21hZ2ljYWRzLXByb21wdC1tYXJrZXRwbGFjZSI7czo1OiJyb3V0ZSI7czoyMjoiYWRtaW4ucGx1Z2lucy5jaGVja291dCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjE7fQ==', 1784287920),
('TR4dY725vtH2FgInzCWKoRvpjCtTFCqGGQ2qAhuy', NULL, '34.78.27.228', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoid1JMZUd1aTg4VzdnR2FFeGpibGNRU0JHQVVNT2wwUEc5NmJTeUFiYSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTk6Imh0dHA6Ly9iZWxvdmV2bi5jb20iO3M6NToicm91dGUiO3M6NDoiaG9tZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1784285251);

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

--
-- Table structure for table `social_media_settings`
--

CREATE TABLE `social_media_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `social_media` tinyint(1) NOT NULL DEFAULT 0,
  `facebook` tinyint(1) NOT NULL DEFAULT 0,
  `facebook_api_key` varchar(255) DEFAULT NULL,
  `facebook_api_secret` varchar(255) DEFAULT NULL,
  `facebook_url` varchar(255) DEFAULT NULL,
  `twitter` tinyint(1) NOT NULL DEFAULT 0,
  `twitter_api_key` varchar(255) DEFAULT NULL,
  `twitter_api_secret` varchar(255) DEFAULT NULL,
  `twitter_url` varchar(255) DEFAULT NULL,
  `google` tinyint(1) NOT NULL DEFAULT 0,
  `google_api_key` varchar(255) DEFAULT NULL,
  `google_api_secret` varchar(255) DEFAULT NULL,
  `google_url` varchar(255) DEFAULT NULL,
  `linkedin` tinyint(1) NOT NULL DEFAULT 0,
  `linkedin_api_key` varchar(255) DEFAULT NULL,
  `linkedin_api_secret` varchar(255) DEFAULT NULL,
  `linkedin_url` varchar(255) 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 `social_media_studio_accounts`
--

CREATE TABLE `social_media_studio_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `platform` varchar(30) NOT NULL,
  `platform_id` varchar(191) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `picture` varchar(1024) DEFAULT NULL,
  `type` varchar(30) DEFAULT NULL,
  `access_token` text DEFAULT NULL,
  `refresh_token` text DEFAULT NULL,
  `access_token_expires_at` timestamp NULL DEFAULT NULL,
  `refresh_token_expires_at` timestamp NULL DEFAULT NULL,
  `metadata` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `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 `social_media_studio_posts`
--

CREATE TABLE `social_media_studio_posts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `ad_copy_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ad_copy_variant` smallint(5) UNSIGNED DEFAULT NULL,
  `ad_creative_id` bigint(20) UNSIGNED DEFAULT NULL,
  `caption` text DEFAULT NULL,
  `media_type` varchar(10) DEFAULT NULL,
  `media_path` varchar(255) DEFAULT NULL,
  `media_disk` varchar(20) DEFAULT NULL,
  `media_mime` varchar(80) DEFAULT NULL,
  `schedule_type` enum('immediately','scheduled','repost') NOT NULL DEFAULT 'immediately',
  `scheduled_at` timestamp NULL DEFAULT NULL,
  `repost_start_at` timestamp NULL DEFAULT NULL,
  `repost_end_at` timestamp NULL DEFAULT NULL,
  `repost_interval_minutes` int(10) UNSIGNED DEFAULT NULL,
  `repost_days` varchar(20) DEFAULT NULL,
  `status` enum('draft','scheduled','publishing','completed','partial','failed') NOT NULL DEFAULT 'draft',
  `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 `social_media_studio_settings`
--

CREATE TABLE `social_media_studio_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `social_media_studio_feature` tinyint(1) NOT NULL DEFAULT 0,
  `social_media_studio_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `ai_pricing` text DEFAULT NULL,
  `twitter_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `linkedin_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `facebook_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `instagram_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `tiktok_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `youtube_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `twitter_client_id` text DEFAULT NULL,
  `twitter_client_secret` text DEFAULT NULL,
  `linkedin_client_id` text DEFAULT NULL,
  `linkedin_client_secret` text DEFAULT NULL,
  `facebook_client_id` text DEFAULT NULL,
  `facebook_client_secret` text DEFAULT NULL,
  `instagram_client_id` text DEFAULT NULL,
  `instagram_client_secret` text DEFAULT NULL,
  `tiktok_client_key` text DEFAULT NULL,
  `tiktok_client_secret` text DEFAULT NULL,
  `youtube_client_id` text DEFAULT NULL,
  `youtube_client_secret` text 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 `social_media_studio_settings`
--

INSERT INTO `social_media_studio_settings` (`id`, `social_media_studio_feature`, `social_media_studio_free_tier`, `ai_pricing`, `twitter_enabled`, `linkedin_enabled`, `facebook_enabled`, `instagram_enabled`, `tiktok_enabled`, `youtube_enabled`, `twitter_client_id`, `twitter_client_secret`, `linkedin_client_id`, `linkedin_client_secret`, `facebook_client_id`, `facebook_client_secret`, `instagram_client_id`, `instagram_client_secret`, `tiktok_client_key`, `tiktok_client_secret`, `youtube_client_id`, `youtube_client_secret`, `created_at`, `updated_at`) VALUES
(1, 0, 0, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-17 03:08:38', '2026-07-17 03:08:38');

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

--
-- Table structure for table `social_media_studio_targets`
--

CREATE TABLE `social_media_studio_targets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` bigint(20) UNSIGNED NOT NULL,
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `platform` varchar(30) NOT NULL,
  `platform_id` varchar(191) DEFAULT NULL,
  `status` enum('pending','scheduled','publishing','posted','failed','skipped') NOT NULL DEFAULT 'pending',
  `remote_id` varchar(191) DEFAULT NULL,
  `remote_url` varchar(1024) DEFAULT NULL,
  `error` text DEFAULT NULL,
  `attempts` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `run_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `next_run_at` timestamp NULL DEFAULT NULL,
  `last_attempt_at` timestamp NULL DEFAULT NULL,
  `published_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;

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

--
-- Table structure for table `subscribers`
--

CREATE TABLE `subscribers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `active_until` datetime DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `status` enum('active','deactive','pending','cancelled','ended') NOT NULL DEFAULT 'active',
  `gateway` varchar(30) DEFAULT NULL,
  `amount_due` decimal(15,2) UNSIGNED NOT NULL,
  `currency` char(3) NOT NULL DEFAULT 'USD',
  `plan_type` enum('prepaid','monthly','yearly','lifetime') DEFAULT NULL,
  `subscription_id` varchar(30) NOT NULL,
  `external_subscription_id` varchar(255) DEFAULT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `gateway_data` text 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 `support_messages`
--

CREATE TABLE `support_messages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `role` varchar(20) DEFAULT NULL,
  `ticket_id` varchar(30) NOT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  `message` text NOT 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 `support_tickets`
--

CREATE TABLE `support_tickets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `priority` varchar(20) NOT NULL,
  `category` varchar(20) NOT NULL COMMENT 'technical|billing|account|general|request',
  `status` varchar(20) NOT NULL COMMENT 'open|in_progress|resolved|closed',
  `subject` varchar(200) NOT NULL,
  `resolved_on` 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;

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

--
-- Table structure for table `teams`
--

CREATE TABLE `teams` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `owner_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(120) NOT NULL,
  `avatar` varchar(255) 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 `team_activities`
--

CREATE TABLE `team_activities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `team_id` bigint(20) UNSIGNED NOT NULL,
  `actor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` varchar(40) NOT NULL,
  `description` varchar(255) NOT NULL,
  `credits` int(11) NOT NULL DEFAULT 0,
  `meta` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`meta`)),
  `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 `team_invitations`
--

CREATE TABLE `team_invitations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `team_id` bigint(20) UNSIGNED NOT NULL,
  `email` varchar(255) NOT NULL,
  `token` varchar(64) NOT NULL,
  `invited_by` bigint(20) UNSIGNED DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `expires_at` timestamp NULL DEFAULT NULL,
  `accepted_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;

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

--
-- Table structure for table `team_members`
--

CREATE TABLE `team_members` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `team_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `role` varchar(20) NOT NULL DEFAULT 'member',
  `joined_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;

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

--
-- Table structure for table `testimonials`
--

CREATE TABLE `testimonials` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `testimonial` longtext NOT NULL,
  `stars` tinyint(3) UNSIGNED NOT NULL DEFAULT 5,
  `name` varchar(255) NOT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `role` varchar(255) DEFAULT NULL,
  `company` varchar(255) DEFAULT NULL,
  `featured` tinyint(1) NOT NULL DEFAULT 0,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `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;

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

--
-- Table structure for table `text_models`
--

CREATE TABLE `text_models` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `vendor` varchar(255) NOT NULL,
  `model_id` varchar(255) NOT NULL,
  `label` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `driver` varchar(255) NOT NULL,
  `vendor_label` varchar(255) DEFAULT NULL,
  `key_column` varchar(255) NOT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `tint` varchar(255) DEFAULT NULL,
  `tier` varchar(255) DEFAULT NULL,
  `credit_cost` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `enabled` tinyint(1) NOT NULL DEFAULT 1,
  `sort_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 `text_models`
--

INSERT INTO `text_models` (`id`, `vendor`, `model_id`, `label`, `description`, `driver`, `vendor_label`, `key_column`, `icon`, `tint`, `tier`, `credit_cost`, `enabled`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'openai', 'gpt-5.5', 'GPT-5.5', 'Flagship model — top quality for complex, high-converting ad copy.', 'App\\Services\\AdCopy\\Drivers\\OpenAiCopyDriver', 'OpenAI GPT', 'openai_key', 'sparkles', 'emerald', 'premium', 3, 1, 10, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(2, 'openai', 'gpt-5.4', 'GPT-5.4', 'More affordable flagship-tier model. Excellent all-round copy quality.', 'App\\Services\\AdCopy\\Drivers\\OpenAiCopyDriver', 'OpenAI GPT', 'openai_key', 'sparkles', 'emerald', 'premium', 2, 1, 20, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(3, 'openai', 'gpt-5.4-mini', 'GPT-5.4 Mini', 'Fast & cost-efficient. Great for high-volume runs.', 'App\\Services\\AdCopy\\Drivers\\OpenAiCopyDriver', 'OpenAI GPT', 'openai_key', 'sparkles', 'emerald', 'standard', 1, 1, 30, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(4, 'openai', 'gpt-5.4-nano', 'GPT-5.4 Nano', 'Smallest GPT-5.4 — fastest and cheapest for short copy.', 'App\\Services\\AdCopy\\Drivers\\OpenAiCopyDriver', 'OpenAI GPT', 'openai_key', 'sparkles', 'emerald', 'fast', 1, 1, 40, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(5, 'gemini', 'gemini-3.1-pro-preview', 'Gemini 3.1 Pro', 'Highest-quality Gemini. Best for long-form / multilingual / complex briefs.', 'App\\Services\\AdCopy\\Drivers\\GeminiCopyDriver', 'Google Gemini', 'gemini_key', 'cpu-chip', 'sky', 'premium', 3, 1, 50, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(6, 'gemini', 'gemini-3.5-flash', 'Gemini 3.5 Flash', 'Near-Pro intelligence at Flash speed & cost. Strong general-purpose pick.', 'App\\Services\\AdCopy\\Drivers\\GeminiCopyDriver', 'Google Gemini', 'gemini_key', 'cpu-chip', 'sky', 'standard', 1, 1, 60, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(7, 'gemini', 'gemini-3.1-flash-lite', 'Gemini 3.1 Flash-Lite', 'Fastest, most budget-friendly Gemini. Great for high-volume short copy.', 'App\\Services\\AdCopy\\Drivers\\GeminiCopyDriver', 'Google Gemini', 'gemini_key', 'cpu-chip', 'sky', 'fast', 1, 1, 70, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(8, 'anthropic', 'claude-opus-4-8', 'Claude Opus 4.8', 'Most capable Claude. Best for complex, premium, high-stakes copy.', 'App\\Services\\AdCopy\\Drivers\\AnthropicCopyDriver', 'Anthropic Claude', 'anthropic_key', 'chat-bubble-left-right', 'amber', 'premium', 4, 1, 80, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(9, 'anthropic', 'claude-sonnet-4-6', 'Claude Sonnet 4.6', 'Best balance of speed and intelligence. Strong default pick.', 'App\\Services\\AdCopy\\Drivers\\AnthropicCopyDriver', 'Anthropic Claude', 'anthropic_key', 'chat-bubble-left-right', 'amber', 'standard', 2, 1, 90, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(10, 'anthropic', 'claude-haiku-4-5', 'Claude Haiku 4.5', 'Fastest Claude with near-frontier quality. Great for high-volume runs.', 'App\\Services\\AdCopy\\Drivers\\AnthropicCopyDriver', 'Anthropic Claude', 'anthropic_key', 'chat-bubble-left-right', 'amber', 'fast', 1, 1, 100, '2026-07-17 03:08:43', '2026-07-17 03:08:43'),
(11, 'xai', 'grok-4.3', 'Grok 4.3', 'xAI flagship. Most intelligent and fastest Grok, with a 1M-token context.', 'App\\Services\\AdCopy\\Drivers\\GrokCopyDriver', 'xAI Grok', 'xai_key', 'bolt', 'zinc', 'premium', 2, 1, 110, '2026-07-17 03:08:43', '2026-07-17 03:08:43');

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

--
-- Table structure for table `ugc_factory_actors`
--

CREATE TABLE `ugc_factory_actors` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `source` varchar(20) NOT NULL DEFAULT 'upload',
  `image_path` varchar(255) NOT NULL,
  `prompt` text 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 `ugc_factory_creations`
--

CREATE TABLE `ugc_factory_creations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(30) NOT NULL DEFAULT 'ugc_video',
  `title` varchar(255) DEFAULT NULL,
  `script` text DEFAULT NULL,
  `source_files` text DEFAULT NULL,
  `meta` text DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `provider_job_id` varchar(255) DEFAULT NULL,
  `result_path` varchar(255) DEFAULT NULL,
  `mime_type` varchar(50) DEFAULT NULL,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `error_message` text DEFAULT NULL,
  `submitted_at` timestamp NULL DEFAULT NULL,
  `last_polled_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `poll_count` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `is_favorite` tinyint(1) 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;

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

--
-- Table structure for table `ugc_factory_voices`
--

CREATE TABLE `ugc_factory_voices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `voice_ref` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `gender` varchar(20) DEFAULT NULL,
  `accent` varchar(40) DEFAULT NULL,
  `language` varchar(10) DEFAULT NULL,
  `tone` varchar(60) DEFAULT NULL,
  `preview_url` varchar(512) DEFAULT NULL,
  `source` varchar(20) NOT NULL DEFAULT 'premade',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_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;

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `group` varchar(20) NOT NULL DEFAULT 'user',
  `workbook` varchar(100) DEFAULT NULL,
  `plan_id` int(11) DEFAULT NULL,
  `company` varchar(100) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `phone_number` varchar(20) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `country` varchar(2) DEFAULT NULL,
  `balance` decimal(12,2) NOT NULL DEFAULT 0.00,
  `wallet` decimal(12,2) NOT NULL DEFAULT 0.00,
  `avatar` varchar(255) DEFAULT NULL,
  `last_seen` timestamp NULL DEFAULT NULL,
  `google2fa_secret` varchar(100) DEFAULT NULL,
  `google2fa_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `referral_id` varchar(20) DEFAULT NULL,
  `referred_by` varchar(20) DEFAULT NULL,
  `referral_paypal` varchar(191) DEFAULT NULL,
  `referral_bank` text DEFAULT NULL,
  `personal_api_key` tinyint(1) NOT NULL DEFAULT 0,
  `hidden_plan` tinyint(1) NOT NULL DEFAULT 0,
  `used_free_tier` tinyint(1) NOT NULL DEFAULT 0,
  `theme` varchar(10) NOT NULL DEFAULT 'light',
  `subscription_required` tinyint(1) NOT NULL DEFAULT 0,
  `verification_code` varchar(100) DEFAULT NULL,
  `email_opt_in` tinyint(1) NOT NULL DEFAULT 1,
  `credits` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `credits_prepaid` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `onboarding_completed` tinyint(1) NOT NULL DEFAULT 0,
  `onboarding_completed_at` timestamp NULL DEFAULT NULL,
  `onboarding_current_step` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `onboarding_total_steps` tinyint(3) UNSIGNED NOT NULL DEFAULT 15,
  `onboarding_skipped` tinyint(1) NOT NULL DEFAULT 0,
  `two_factor_secret` text DEFAULT NULL,
  `two_factor_recovery_codes` text DEFAULT NULL,
  `two_factor_confirmed_at` timestamp NULL DEFAULT NULL,
  `provider` varchar(30) DEFAULT NULL,
  `provider_id` varchar(255) DEFAULT NULL,
  `remember_token` varchar(100) 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 `users`
--

INSERT INTO `users` (`id`, `name`, `user_id`, `email`, `email_verified_at`, `password`, `status`, `group`, `workbook`, `plan_id`, `company`, `website`, `phone_number`, `address`, `city`, `postal_code`, `country`, `balance`, `wallet`, `avatar`, `last_seen`, `google2fa_secret`, `google2fa_enabled`, `referral_id`, `referred_by`, `referral_paypal`, `referral_bank`, `personal_api_key`, `hidden_plan`, `used_free_tier`, `theme`, `subscription_required`, `verification_code`, `email_opt_in`, `credits`, `credits_prepaid`, `onboarding_completed`, `onboarding_completed_at`, `onboarding_current_step`, `onboarding_total_steps`, `onboarding_skipped`, `two_factor_secret`, `two_factor_recovery_codes`, `two_factor_confirmed_at`, `provider`, `provider_id`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'miq4y-n8kwq-x11kp', 'admin@example.com', '2026-07-17 11:25:17', '$2y$12$wF4P9/1jFQ7RUUayfaZYOOuN7WW5wQzniApa9JKuItClmnbeZR/t6', 'active', 'admin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, '2026-07-17 11:25:28', NULL, 0, 'RJ9HPONGZ4LANJT', NULL, NULL, NULL, 0, 0, 0, 'light', 0, NULL, 1, 1000000, 0, 1, '2026-07-17 11:25:17', 0, 15, 0, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-17 11:25:17', '2026-07-17 11:25:28');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `ad_accounts`
--
ALTER TABLE `ad_accounts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ad_account_unique` (`user_id`,`provider`,`external_id`),
  ADD KEY `ad_accounts_user_id_provider_index` (`user_id`,`provider`);

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

--
-- Indexes for table `ad_copies`
--
ALTER TABLE `ad_copies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ad_copies_brand_id_foreign` (`brand_id`),
  ADD KEY `ad_copies_user_id_created_at_index` (`user_id`,`created_at`),
  ADD KEY `ad_copies_user_id_platform_index` (`user_id`,`platform`),
  ADD KEY `ad_copies_user_id_is_favorite_index` (`user_id`,`is_favorite`),
  ADD KEY `ad_copies_project_id_index` (`project_id`);

--
-- Indexes for table `ad_creatives`
--
ALTER TABLE `ad_creatives`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ad_creatives_user_id_type_created_at_index` (`user_id`,`type`,`created_at`),
  ADD KEY `ad_creatives_user_id_status_index` (`user_id`,`status`),
  ADD KEY `ad_creatives_type_status_index` (`type`,`status`),
  ADD KEY `ad_creatives_project_id_index` (`project_id`);

--
-- Indexes for table `ad_insights`
--
ALTER TABLE `ad_insights`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ad_insights_user_id_created_at_index` (`user_id`,`created_at`);

--
-- Indexes for table `ad_metrics`
--
ALTER TABLE `ad_metrics`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ad_metric_grain_unique` (`ad_account_id`,`level`,`entity_id`,`date`),
  ADD KEY `ad_metrics_user_id_date_index` (`user_id`,`date`),
  ADD KEY `ad_metrics_ad_account_id_date_index` (`ad_account_id`,`date`),
  ADD KEY `ad_metrics_ad_account_id_level_date_index` (`ad_account_id`,`level`,`date`);

--
-- Indexes for table `avatar_studio_avatars`
--
ALTER TABLE `avatar_studio_avatars`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `avatar_studio_avatars_avatar_id_unique` (`avatar_id`),
  ADD KEY `avatar_studio_avatars_sort_order_index` (`sort_order`);

--
-- Indexes for table `avatar_studio_creations`
--
ALTER TABLE `avatar_studio_creations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `avatar_studio_creations_user_id_type_index` (`user_id`,`type`),
  ADD KEY `avatar_studio_creations_status_provider_job_id_index` (`status`,`provider_job_id`),
  ADD KEY `avatar_studio_creations_user_id_index` (`user_id`);

--
-- Indexes for table `avatar_studio_stock_voices`
--
ALTER TABLE `avatar_studio_stock_voices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `avatar_studio_stock_voices_voice_id_unique` (`voice_id`),
  ADD KEY `avatar_studio_stock_voices_sort_order_index` (`sort_order`),
  ADD KEY `avatar_studio_stock_voices_language_index` (`language`);

--
-- Indexes for table `avatar_studio_voices`
--
ALTER TABLE `avatar_studio_voices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `avatar_studio_voices_user_id_status_index` (`user_id`,`status`),
  ADD KEY `avatar_studio_voices_user_id_index` (`user_id`);

--
-- Indexes for table `blog_comments`
--
ALTER TABLE `blog_comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `blog_comments_parent_id_foreign` (`parent_id`),
  ADD KEY `blog_comments_blog_post_id_status_index` (`blog_post_id`,`status`),
  ADD KEY `blog_comments_status_index` (`status`);

--
-- Indexes for table `blog_posts`
--
ALTER TABLE `blog_posts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `blog_posts_slug_unique` (`slug`),
  ADD KEY `blog_posts_status_published_at_index` (`status`,`published_at`),
  ADD KEY `blog_posts_category_index` (`category`),
  ADD KEY `blog_posts_status_index` (`status`),
  ADD KEY `blog_posts_published_at_index` (`published_at`),
  ADD KEY `blog_posts_is_featured_index` (`is_featured`);

--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
  ADD PRIMARY KEY (`id`),
  ADD KEY `brands_user_id_is_active_index` (`user_id`,`is_active`),
  ADD KEY `brands_user_id_is_default_index` (`user_id`,`is_default`);

--
-- Indexes for table `brand_kits`
--
ALTER TABLE `brand_kits`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `brand_kits_user_id_unique` (`user_id`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `channel_broadcasts`
--
ALTER TABLE `channel_broadcasts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `channel_broadcasts_user_id_status_index` (`user_id`,`status`);

--
-- Indexes for table `channel_broadcast_destinations`
--
ALTER TABLE `channel_broadcast_destinations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `channel_broadcast_destinations_user_id_channel_index` (`user_id`,`channel`);

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

--
-- Indexes for table `channel_broadcast_targets`
--
ALTER TABLE `channel_broadcast_targets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `channel_broadcast_targets_broadcast_id_foreign` (`broadcast_id`),
  ADD KEY `channel_broadcast_targets_destination_id_foreign` (`destination_id`),
  ADD KEY `channel_broadcast_targets_status_next_run_at_index` (`status`,`next_run_at`);

--
-- Indexes for table `cloud_storages`
--
ALTER TABLE `cloud_storages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `cloud_storages_provider_unique` (`provider`);

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

--
-- Indexes for table `coupons`
--
ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `coupons_code_unique` (`code`),
  ADD KEY `coupons_status_index` (`status`),
  ADD KEY `coupons_owner_id_index` (`owner_id`),
  ADD KEY `coupons_batch_id_index` (`batch_id`);

--
-- Indexes for table `coupon_redemptions`
--
ALTER TABLE `coupon_redemptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `coupon_redemptions_coupon_id_index` (`coupon_id`),
  ADD KEY `coupon_redemptions_code_index` (`code`),
  ADD KEY `coupon_redemptions_user_id_index` (`user_id`),
  ADD KEY `coupon_redemptions_order_id_index` (`order_id`);

--
-- Indexes for table `creative_ad_links`
--
ALTER TABLE `creative_ad_links`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `creative_link_ad_unique` (`ad_account_id`,`external_ad_id`),
  ADD KEY `creative_ad_links_creative_id_foreign` (`creative_id`),
  ADD KEY `creative_ad_links_user_id_creative_id_index` (`user_id`,`creative_id`);

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

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

--
-- Indexes for table `extension_settings`
--
ALTER TABLE `extension_settings`
  ADD PRIMARY KEY (`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 `faqs`
--
ALTER TABLE `faqs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fashion_studio_assets`
--
ALTER TABLE `fashion_studio_assets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fashion_studio_assets_user_id_kind_index` (`user_id`,`kind`),
  ADD KEY `fashion_studio_assets_user_id_index` (`user_id`);

--
-- Indexes for table `fashion_studio_photoshoots`
--
ALTER TABLE `fashion_studio_photoshoots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fashion_studio_photoshoots_user_id_type_index` (`user_id`,`type`),
  ADD KEY `fashion_studio_photoshoots_user_id_is_favorite_index` (`user_id`,`is_favorite`),
  ADD KEY `fashion_studio_photoshoots_user_id_index` (`user_id`);

--
-- Indexes for table `fashion_studio_wardrobe_items`
--
ALTER TABLE `fashion_studio_wardrobe_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fashion_studio_wardrobe_items_user_id_category_index` (`user_id`,`category`),
  ADD KEY `fashion_studio_wardrobe_items_user_id_index` (`user_id`);

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

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

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

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

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

--
-- Indexes for table `gift_cards`
--
ALTER TABLE `gift_cards`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `gift_cards_code_unique` (`code`),
  ADD KEY `gift_cards_status_index` (`status`),
  ADD KEY `gift_cards_owner_id_index` (`owner_id`),
  ADD KEY `gift_cards_batch_id_index` (`batch_id`);

--
-- Indexes for table `gift_card_redemptions`
--
ALTER TABLE `gift_card_redemptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `gift_card_redemptions_gift_card_id_index` (`gift_card_id`),
  ADD KEY `gift_card_redemptions_code_index` (`code`),
  ADD KEY `gift_card_redemptions_user_id_index` (`user_id`);

--
-- Indexes for table `gift_card_transfers`
--
ALTER TABLE `gift_card_transfers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `gift_card_transfers_transfer_id_unique` (`transfer_id`),
  ADD KEY `gift_card_transfers_gift_card_id_index` (`gift_card_id`),
  ADD KEY `gift_card_transfers_sender_id_index` (`sender_id`),
  ADD KEY `gift_card_transfers_receiver_id_index` (`receiver_id`);

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

--
-- Indexes for table `invoice_settings`
--
ALTER TABLE `invoice_settings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_settings_city_index` (`city`),
  ADD KEY `invoice_settings_country_index` (`country`);

--
-- 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 `media_models`
--
ALTER TABLE `media_models`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `media_models_vendor_unique` (`vendor`),
  ADD KEY `media_models_type_is_active_sort_order_index` (`type`,`is_active`,`sort_order`),
  ADD KEY `media_models_type_index` (`type`);

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

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `orders_user_id_index` (`user_id`),
  ADD KEY `orders_order_id_index` (`order_id`),
  ADD KEY `orders_plan_id_index` (`plan_id`),
  ADD KEY `orders_status_index` (`status`);

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

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `payouts`
--
ALTER TABLE `payouts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `payouts_request_id_unique` (`request_id`),
  ADD KEY `payouts_user_id_index` (`user_id`),
  ADD KEY `payouts_status_index` (`status`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `plans`
--
ALTER TABLE `plans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `plans_plan_id_unique` (`plan_id`),
  ADD KEY `plans_status_plan_type_order_index` (`status`,`plan_type`,`order`),
  ADD KEY `plans_status_plan_type_index` (`status`,`plan_type`);

--
-- Indexes for table `product_photoshoot_assets`
--
ALTER TABLE `product_photoshoot_assets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_photoshoot_assets_user_id_kind_index` (`user_id`,`kind`),
  ADD KEY `product_photoshoot_assets_user_id_index` (`user_id`);

--
-- Indexes for table `product_photoshoot_products`
--
ALTER TABLE `product_photoshoot_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_photoshoot_products_user_id_category_index` (`user_id`,`category`),
  ADD KEY `product_photoshoot_products_user_id_index` (`user_id`);

--
-- Indexes for table `product_photoshoot_shoots`
--
ALTER TABLE `product_photoshoot_shoots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_photoshoot_shoots_user_id_type_index` (`user_id`,`type`),
  ADD KEY `product_photoshoot_shoots_user_id_is_favorite_index` (`user_id`,`is_favorite`),
  ADD KEY `product_photoshoot_shoots_user_id_index` (`user_id`);

--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
  ADD PRIMARY KEY (`id`),
  ADD KEY `projects_brand_id_foreign` (`brand_id`),
  ADD KEY `projects_user_id_updated_at_index` (`user_id`,`updated_at`);

--
-- Indexes for table `project_user`
--
ALTER TABLE `project_user`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `project_user_project_id_user_id_unique` (`project_id`,`user_id`),
  ADD KEY `project_user_shared_by_foreign` (`shared_by`),
  ADD KEY `project_user_user_id_index` (`user_id`);

--
-- Indexes for table `prompts`
--
ALTER TABLE `prompts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `prompts_type_is_global_index` (`type`,`is_global`),
  ADD KEY `prompts_user_id_type_index` (`user_id`,`type`);

--
-- Indexes for table `prompt_favorites`
--
ALTER TABLE `prompt_favorites`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `prompt_favorites_user_id_prompt_id_unique` (`user_id`,`prompt_id`),
  ADD KEY `prompt_favorites_prompt_id_foreign` (`prompt_id`);

--
-- Indexes for table `prompt_listings`
--
ALTER TABLE `prompt_listings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `prompt_listings_public_id_unique` (`public_id`),
  ADD UNIQUE KEY `prompt_listings_ad_creative_id_unique` (`ad_creative_id`),
  ADD KEY `prompt_listings_status_type_is_paid_index` (`status`,`type`,`is_paid`),
  ADD KEY `prompt_listings_seller_id_status_index` (`seller_id`,`status`);

--
-- Indexes for table `prompt_purchases`
--
ALTER TABLE `prompt_purchases`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `prompt_purchases_public_id_unique` (`public_id`),
  ADD UNIQUE KEY `prompt_purchases_order_reference_unique` (`order_reference`),
  ADD KEY `prompt_purchases_listing_id_foreign` (`listing_id`),
  ADD KEY `prompt_purchases_buyer_id_status_index` (`buyer_id`,`status`),
  ADD KEY `prompt_purchases_seller_id_status_index` (`seller_id`,`status`),
  ADD KEY `prompt_purchases_status_created_at_index` (`status`,`created_at`);

--
-- Indexes for table `prompt_withdrawals`
--
ALTER TABLE `prompt_withdrawals`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `prompt_withdrawals_request_id_unique` (`request_id`),
  ADD KEY `prompt_withdrawals_user_id_status_index` (`user_id`,`status`),
  ADD KEY `prompt_withdrawals_status_created_at_index` (`status`,`created_at`);

--
-- Indexes for table `pulse_aggregates`
--
ALTER TABLE `pulse_aggregates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pulse_aggregates_bucket_period_type_aggregate_key_hash_unique` (`bucket`,`period`,`type`,`aggregate`,`key_hash`),
  ADD KEY `pulse_aggregates_period_bucket_index` (`period`,`bucket`),
  ADD KEY `pulse_aggregates_type_index` (`type`),
  ADD KEY `pulse_aggregates_period_type_aggregate_bucket_index` (`period`,`type`,`aggregate`,`bucket`);

--
-- Indexes for table `pulse_entries`
--
ALTER TABLE `pulse_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pulse_entries_timestamp_index` (`timestamp`),
  ADD KEY `pulse_entries_type_index` (`type`),
  ADD KEY `pulse_entries_key_hash_index` (`key_hash`),
  ADD KEY `pulse_entries_timestamp_type_key_hash_value_index` (`timestamp`,`type`,`key_hash`,`value`);

--
-- Indexes for table `pulse_values`
--
ALTER TABLE `pulse_values`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pulse_values_type_key_hash_unique` (`type`,`key_hash`),
  ADD KEY `pulse_values_timestamp_index` (`timestamp`),
  ADD KEY `pulse_values_type_index` (`type`);

--
-- Indexes for table `referrals`
--
ALTER TABLE `referrals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `referrals_referrer_id_index` (`referrer_id`),
  ADD KEY `referrals_referred_id_index` (`referred_id`),
  ADD KEY `referrals_order_id_index` (`order_id`),
  ADD KEY `referrals_status_index` (`status`);

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

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

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

--
-- 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 `social_media_settings`
--
ALTER TABLE `social_media_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `social_media_studio_accounts`
--
ALTER TABLE `social_media_studio_accounts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sms_account_unique` (`user_id`,`platform`,`platform_id`),
  ADD KEY `social_media_studio_accounts_user_id_platform_index` (`user_id`,`platform`);

--
-- Indexes for table `social_media_studio_posts`
--
ALTER TABLE `social_media_studio_posts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `social_media_studio_posts_ad_copy_id_foreign` (`ad_copy_id`),
  ADD KEY `social_media_studio_posts_ad_creative_id_foreign` (`ad_creative_id`),
  ADD KEY `social_media_studio_posts_user_id_created_at_index` (`user_id`,`created_at`),
  ADD KEY `social_media_studio_posts_status_index` (`status`);

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

--
-- Indexes for table `social_media_studio_targets`
--
ALTER TABLE `social_media_studio_targets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `social_media_studio_targets_account_id_foreign` (`account_id`),
  ADD KEY `social_media_studio_targets_status_next_run_at_index` (`status`,`next_run_at`),
  ADD KEY `social_media_studio_targets_post_id_index` (`post_id`);

--
-- Indexes for table `subscribers`
--
ALTER TABLE `subscribers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subscribers_plan_id_foreign` (`plan_id`),
  ADD KEY `subscribers_user_id_status_active_until_index` (`user_id`,`status`,`active_until`),
  ADD KEY `subscribers_status_active_until_index` (`status`,`active_until`),
  ADD KEY `subscribers_status_plan_type_index` (`status`,`plan_type`);

--
-- Indexes for table `support_messages`
--
ALTER TABLE `support_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `support_messages_user_id_index` (`user_id`),
  ADD KEY `support_messages_ticket_id_index` (`ticket_id`);

--
-- Indexes for table `support_tickets`
--
ALTER TABLE `support_tickets`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `support_tickets_ticket_id_unique` (`ticket_id`),
  ADD KEY `support_tickets_user_id_index` (`user_id`),
  ADD KEY `support_tickets_category_index` (`category`),
  ADD KEY `support_tickets_status_index` (`status`);

--
-- Indexes for table `teams`
--
ALTER TABLE `teams`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `teams_owner_id_unique` (`owner_id`);

--
-- Indexes for table `team_activities`
--
ALTER TABLE `team_activities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `team_activities_actor_id_foreign` (`actor_id`),
  ADD KEY `team_activities_team_id_created_at_index` (`team_id`,`created_at`),
  ADD KEY `team_activities_team_id_type_index` (`team_id`,`type`);

--
-- Indexes for table `team_invitations`
--
ALTER TABLE `team_invitations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `team_invitations_token_unique` (`token`),
  ADD KEY `team_invitations_invited_by_foreign` (`invited_by`),
  ADD KEY `team_invitations_email_status_index` (`email`,`status`),
  ADD KEY `team_invitations_team_id_status_index` (`team_id`,`status`);

--
-- Indexes for table `team_members`
--
ALTER TABLE `team_members`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `team_members_user_id_unique` (`user_id`),
  ADD KEY `team_members_team_id_role_index` (`team_id`,`role`);

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

--
-- Indexes for table `text_models`
--
ALTER TABLE `text_models`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `text_models_vendor_model_id_unique` (`vendor`,`model_id`),
  ADD KEY `text_models_enabled_sort_order_index` (`enabled`,`sort_order`),
  ADD KEY `text_models_vendor_index` (`vendor`);

--
-- Indexes for table `ugc_factory_actors`
--
ALTER TABLE `ugc_factory_actors`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ugc_factory_actors_user_id_created_at_index` (`user_id`,`created_at`),
  ADD KEY `ugc_factory_actors_user_id_index` (`user_id`);

--
-- Indexes for table `ugc_factory_creations`
--
ALTER TABLE `ugc_factory_creations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ugc_factory_creations_user_id_type_index` (`user_id`,`type`),
  ADD KEY `ugc_factory_creations_status_provider_job_id_index` (`status`,`provider_job_id`),
  ADD KEY `ugc_factory_creations_user_id_index` (`user_id`);

--
-- Indexes for table `ugc_factory_voices`
--
ALTER TABLE `ugc_factory_voices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ugc_factory_voices_voice_ref_unique` (`voice_ref`),
  ADD KEY `ugc_factory_voices_is_active_language_index` (`is_active`,`language`),
  ADD KEY `ugc_factory_voices_source_index` (`source`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_user_id_unique` (`user_id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD KEY `users_provider_provider_id_index` (`provider`,`provider_id`),
  ADD KEY `users_group_status_index` (`group`,`status`),
  ADD KEY `users_plan_id_status_index` (`plan_id`,`status`),
  ADD KEY `users_email_verified_at_index` (`email_verified_at`),
  ADD KEY `users_status_index` (`status`),
  ADD KEY `users_group_index` (`group`),
  ADD KEY `users_plan_id_index` (`plan_id`),
  ADD KEY `users_last_seen_index` (`last_seen`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `invoice_settings`
--
ALTER TABLE `invoice_settings`
  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 for table `media_models`
--
ALTER TABLE `media_models`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `referral_configurations`
--
ALTER TABLE `referral_configurations`
  MODIFY `id` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `ad_accounts`
--
ALTER TABLE `ad_accounts`
  ADD CONSTRAINT `ad_accounts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ad_copies`
--
ALTER TABLE `ad_copies`
  ADD CONSTRAINT `ad_copies_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `ad_copies_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `ad_copies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ad_creatives`
--
ALTER TABLE `ad_creatives`
  ADD CONSTRAINT `ad_creatives_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `ad_creatives_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ad_insights`
--
ALTER TABLE `ad_insights`
  ADD CONSTRAINT `ad_insights_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ad_metrics`
--
ALTER TABLE `ad_metrics`
  ADD CONSTRAINT `ad_metrics_ad_account_id_foreign` FOREIGN KEY (`ad_account_id`) REFERENCES `ad_accounts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ad_metrics_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `blog_comments`
--
ALTER TABLE `blog_comments`
  ADD CONSTRAINT `blog_comments_blog_post_id_foreign` FOREIGN KEY (`blog_post_id`) REFERENCES `blog_posts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `blog_comments_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `blog_comments` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `brands`
--
ALTER TABLE `brands`
  ADD CONSTRAINT `brands_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `brand_kits`
--
ALTER TABLE `brand_kits`
  ADD CONSTRAINT `brand_kits_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `channel_broadcasts`
--
ALTER TABLE `channel_broadcasts`
  ADD CONSTRAINT `channel_broadcasts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `channel_broadcast_destinations`
--
ALTER TABLE `channel_broadcast_destinations`
  ADD CONSTRAINT `channel_broadcast_destinations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `channel_broadcast_targets`
--
ALTER TABLE `channel_broadcast_targets`
  ADD CONSTRAINT `channel_broadcast_targets_broadcast_id_foreign` FOREIGN KEY (`broadcast_id`) REFERENCES `channel_broadcasts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `channel_broadcast_targets_destination_id_foreign` FOREIGN KEY (`destination_id`) REFERENCES `channel_broadcast_destinations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `creative_ad_links`
--
ALTER TABLE `creative_ad_links`
  ADD CONSTRAINT `creative_ad_links_ad_account_id_foreign` FOREIGN KEY (`ad_account_id`) REFERENCES `ad_accounts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `creative_ad_links_creative_id_foreign` FOREIGN KEY (`creative_id`) REFERENCES `ad_creatives` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `creative_ad_links_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `projects`
--
ALTER TABLE `projects`
  ADD CONSTRAINT `projects_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `projects_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `project_user`
--
ALTER TABLE `project_user`
  ADD CONSTRAINT `project_user_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `project_user_shared_by_foreign` FOREIGN KEY (`shared_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `project_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `prompts`
--
ALTER TABLE `prompts`
  ADD CONSTRAINT `prompts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `prompt_favorites`
--
ALTER TABLE `prompt_favorites`
  ADD CONSTRAINT `prompt_favorites_prompt_id_foreign` FOREIGN KEY (`prompt_id`) REFERENCES `prompts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `prompt_favorites_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `prompt_listings`
--
ALTER TABLE `prompt_listings`
  ADD CONSTRAINT `prompt_listings_ad_creative_id_foreign` FOREIGN KEY (`ad_creative_id`) REFERENCES `ad_creatives` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `prompt_listings_seller_id_foreign` FOREIGN KEY (`seller_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `prompt_purchases`
--
ALTER TABLE `prompt_purchases`
  ADD CONSTRAINT `prompt_purchases_buyer_id_foreign` FOREIGN KEY (`buyer_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `prompt_purchases_listing_id_foreign` FOREIGN KEY (`listing_id`) REFERENCES `prompt_listings` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `prompt_purchases_seller_id_foreign` FOREIGN KEY (`seller_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `prompt_withdrawals`
--
ALTER TABLE `prompt_withdrawals`
  ADD CONSTRAINT `prompt_withdrawals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `social_media_studio_accounts`
--
ALTER TABLE `social_media_studio_accounts`
  ADD CONSTRAINT `social_media_studio_accounts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `social_media_studio_posts`
--
ALTER TABLE `social_media_studio_posts`
  ADD CONSTRAINT `social_media_studio_posts_ad_copy_id_foreign` FOREIGN KEY (`ad_copy_id`) REFERENCES `ad_copies` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `social_media_studio_posts_ad_creative_id_foreign` FOREIGN KEY (`ad_creative_id`) REFERENCES `ad_creatives` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `social_media_studio_posts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `social_media_studio_targets`
--
ALTER TABLE `social_media_studio_targets`
  ADD CONSTRAINT `social_media_studio_targets_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `social_media_studio_accounts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `social_media_studio_targets_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `social_media_studio_posts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subscribers`
--
ALTER TABLE `subscribers`
  ADD CONSTRAINT `subscribers_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`),
  ADD CONSTRAINT `subscribers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `support_messages`
--
ALTER TABLE `support_messages`
  ADD CONSTRAINT `support_messages_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `support_tickets` (`ticket_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `support_messages_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `support_tickets`
--
ALTER TABLE `support_tickets`
  ADD CONSTRAINT `support_tickets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `teams`
--
ALTER TABLE `teams`
  ADD CONSTRAINT `teams_owner_id_foreign` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `team_activities`
--
ALTER TABLE `team_activities`
  ADD CONSTRAINT `team_activities_actor_id_foreign` FOREIGN KEY (`actor_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `team_activities_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `team_invitations`
--
ALTER TABLE `team_invitations`
  ADD CONSTRAINT `team_invitations_invited_by_foreign` FOREIGN KEY (`invited_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `team_invitations_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `team_members`
--
ALTER TABLE `team_members`
  ADD CONSTRAINT `team_members_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `team_members_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
