--
-- Host: localhost    Database: msprode1_digisplix
-- ------------------------------------------------------


--
-- Table structure for table `2_f_a_s`
--

CREATE TABLE `2_f_a_s` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `code` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `2_f_a_s_user_id_foreign` (`user_id`),
  CONSTRAINT `2_f_a_s_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `2_f_a_s`
--


--
-- Table structure for table `attachments`
--

CREATE TABLE `attachments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `attachment` varchar(255) NOT NULL,
  `attachable_type` varchar(255) NOT NULL,
  `attachable_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `attachments_attachable_type_attachable_id_index` (`attachable_type`,`attachable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `attachments`
--


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

CREATE TABLE `categories` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `categories` VALUES (1,'Pay Per Click',NULL,NULL),(2,'Search Engine Optimization',NULL,NULL),(3,'Social Media Marketing',NULL,NULL),(4,'Social Media Management',NULL,NULL),(5,'SEO Content Writing',NULL,NULL),(6,'SEO Audit',NULL,NULL),(7,'IOS App Development',NULL,NULL),(8,'Android App Development',NULL,NULL),(9,'Custom Website Design',NULL,NULL),(10,'Wordpress Website Design',NULL,NULL),(11,'UI/UX Design',NULL,NULL),(12,'Front-end Development',NULL,NULL),(13,'Backend Development',NULL,NULL),(14,'Custom CRM Development',NULL,NULL),(15,'Other CMS Web Design',NULL,NULL),(16,'Video Editing & Motion Graphics',NULL,NULL),(17,'2D & 3D Animation',NULL,NULL),(18,'eCommerce Website Design',NULL,NULL),(19,'WooCommerce Store Development',NULL,NULL),(20,'Shopify Store Development',NULL,NULL),(21,'eCommerce Marketing',NULL,NULL),(22,'Logo Design',NULL,NULL),(23,'Brand Identity',NULL,NULL),(24,'Complete Graphics Design Services',NULL,NULL);

--
-- Table structure for table `ch_favorites`
--

CREATE TABLE `ch_favorites` (
  `id` char(36) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `favorite_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ch_favorites`
--


--
-- Table structure for table `ch_messages`
--

CREATE TABLE `ch_messages` (
  `id` char(36) NOT NULL,
  `from_id` bigint(20) NOT NULL,
  `to_id` bigint(20) NOT NULL,
  `body` varchar(5000) DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  `seen` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ch_messages`
--


--
-- Table structure for table `clients`
--

CREATE TABLE `clients` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` varchar(255) DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `url` varchar(255) DEFAULT NULL,
  `business_name` varchar(255) DEFAULT NULL,
  `business_email` varchar(255) DEFAULT NULL,
  `business_phone` varchar(255) DEFAULT NULL,
  `active` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=inactive, 1=active',
  `status` enum('new_lead','contacted','follow_up','in_progress','failed','qualified') NOT NULL DEFAULT 'new_lead',
  `joined_at` timestamp NOT NULL DEFAULT '2023-12-29 11:59:27',
  `followup_date` timestamp NOT NULL DEFAULT '2023-12-29 11:59:27',
  `partner_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `clients_partner_id_foreign` (`partner_id`),
  CONSTRAINT `clients_partner_id_foreign` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `clients`
--

INSERT INTO `clients` VALUES (4,NULL,'Ms.','http://www.hermiston.com/','Buster Larkin','juston.kling@example.com','+1-747-422-3217',1,'qualified','2023-12-29 11:59:39','2023-12-29 11:59:39',19),(16,NULL,'Prof.','http://haley.com/ut-inventore-eius-est-et','Lauryn Kovacek','maegan62@example.net','+1 (718) 405-8201',0,'new_lead','2023-12-29 11:59:39','2023-12-29 11:59:39',19);

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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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


--
-- Table structure for table `invoice_items`
--

CREATE TABLE `invoice_items` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_id` bigint(20) unsigned NOT NULL,
  `description` text NOT NULL,
  `price` double(8,2) unsigned NOT NULL,
  `quantity` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoice_items_invoice_id_foreign` (`invoice_id`),
  CONSTRAINT `invoice_items_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoice_items`
--

INSERT INTO `invoice_items` VALUES (1,1,'Et consequatur eius quia consequatur.',95.36,2,'2023-12-29 11:59:50','2023-12-29 11:59:50'),(2,1,'Amet qui accusantium sunt ut itaque tempore.',64.63,3,'2023-12-29 11:59:50','2023-12-29 11:59:50'),(7,3,'Ab alias suscipit libero dolorem vel autem.',43.74,3,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(8,3,'Ullam enim suscipit nostrum voluptatem.',64.52,5,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(9,3,'Et nobis et assumenda dicta voluptatibus.',77.11,5,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(10,3,'Accusantium occaecati voluptatem molestias quod.',52.83,5,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(13,5,'Nihil unde nisi perspiciatis maxime.',73.08,2,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(14,5,'Error occaecati tenetur iste quia est iusto.',91.61,3,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(15,5,'Ad ea earum ut consequuntur.',99.05,3,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(16,5,'Officia accusantium illum a earum.',93.64,5,'2023-12-29 11:59:51','2023-12-29 11:59:51');

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `invoice_id` varchar(255) NOT NULL,
  `client_id` bigint(20) unsigned NOT NULL,
  `category_id` bigint(20) unsigned NOT NULL,
  `invoice_from` text DEFAULT NULL,
  `invoice_to` text DEFAULT NULL,
  `status` enum('pending','paid','overdue','draft','cancelled') NOT NULL DEFAULT 'pending',
  `sent` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=Not Sent, 1=Sent',
  `due_date` date NOT NULL,
  `terms_n_conditions` text DEFAULT NULL,
  `note` text DEFAULT NULL,
  `recurring` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=Recurring, 1=Non recurring',
  `start_from` date DEFAULT NULL,
  `duration` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `invoices_client_id_foreign` (`client_id`),
  KEY `invoices_category_id_foreign` (`category_id`),
  CONSTRAINT `invoices_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  CONSTRAINT `invoices_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `invoices`
--

INSERT INTO `invoices` VALUES (1,'IVE8RP',4,1,'Kamryn Stehr','Dave Keebler','draft',1,'2024-02-06','Suscipit quo nobis sit sed voluptatem iusto.','Iste labore iste cumque modi.',0,NULL,NULL,'2023-12-29 11:59:50','2023-12-29 11:59:50'),(3,'XFZ9M0',4,6,'Roselyn Streich','Demond Swaniawski I','cancelled',0,'2024-02-01','Aut dolorem hic quibusdam.','Quia officiis eaque et.',0,NULL,NULL,'2023-12-29 11:59:50','2023-12-29 11:59:50'),(5,'HKSFIA',4,23,'Don Blick','Al Breitenberg MD','cancelled',1,'2024-02-14','Quia qui quasi quaerat voluptatem quam.','Aspernatur eligendi impedit minus odio et.',1,'2024-01-24',2,'2023-12-29 11:59:50','2023-12-29 11:59:50');

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

CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL,
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `jobs` VALUES (11,'default','{\"uuid\":\"50846c33-c4ab-4b7a-a0e9-d57b4f445b92\",\"displayName\":\"App\\\\Notifications\\\\SupportUpdate\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"maxExceptions\":null,\"failOnTimeout\":false,\"backoff\":null,\"timeout\":null,\"retryUntil\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":3:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":5:{s:5:\\\"class\\\";s:15:\\\"App\\\\Models\\\\User\\\";s:2:\\\"id\\\";a:1:{i:0;i:48;}s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";s:15:\\\"collectionClass\\\";N;}s:12:\\\"notification\\\";O:31:\\\"App\\\\Notifications\\\\SupportUpdate\\\":3:{s:9:\\\"ticket_id\\\";i:1;s:7:\\\"subject\\\";s:5:\\\"Enim.\\\";s:2:\\\"id\\\";s:36:\\\"9a356210-0a25-45c8-bce3-e3f2f9729cbb\\\";}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}}\"}}',0,NULL,1703858194,1703858194),(12,'default','{\"uuid\":\"aec67f29-0871-4bd4-91fa-bf5b9fc7820c\",\"displayName\":\"App\\\\Notifications\\\\SupportUpdate\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"maxExceptions\":null,\"failOnTimeout\":false,\"backoff\":null,\"timeout\":null,\"retryUntil\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":3:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":5:{s:5:\\\"class\\\";s:15:\\\"App\\\\Models\\\\User\\\";s:2:\\\"id\\\";a:1:{i:0;i:48;}s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";s:15:\\\"collectionClass\\\";N;}s:12:\\\"notification\\\";O:31:\\\"App\\\\Notifications\\\\SupportUpdate\\\":3:{s:9:\\\"ticket_id\\\";i:1;s:7:\\\"subject\\\";s:5:\\\"Enim.\\\";s:2:\\\"id\\\";s:36:\\\"9a356210-0a25-45c8-bce3-e3f2f9729cbb\\\";}s:8:\\\"channels\\\";a:1:{i:0;s:8:\\\"database\\\";}}\"}}',0,NULL,1703858194,1703858194),(13,'default','{\"uuid\":\"eef0f5b8-c7e1-441f-9d62-bced8711fa39\",\"displayName\":\"App\\\\Notifications\\\\LeadStatusUpdated\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"maxExceptions\":null,\"failOnTimeout\":false,\"backoff\":null,\"timeout\":null,\"retryUntil\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":3:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":5:{s:5:\\\"class\\\";s:15:\\\"App\\\\Models\\\\User\\\";s:2:\\\"id\\\";a:1:{i:0;i:56;}s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";s:15:\\\"collectionClass\\\";N;}s:12:\\\"notification\\\";O:35:\\\"App\\\\Notifications\\\\LeadStatusUpdated\\\":3:{s:4:\\\"name\\\";s:25:\\\"Mrs. Chelsie Thompson DVM\\\";s:6:\\\"status\\\";s:8:\\\"New Lead\\\";s:2:\\\"id\\\";s:36:\\\"dfe46103-adfc-4544-baaf-53eab6f5050c\\\";}s:8:\\\"channels\\\";a:1:{i:0;s:4:\\\"mail\\\";}}\"}}',0,NULL,1703905529,1703905529),(14,'default','{\"uuid\":\"86364c9b-4b64-404c-8b7b-52e559056a07\",\"displayName\":\"App\\\\Notifications\\\\LeadStatusUpdated\",\"job\":\"Illuminate\\\\Queue\\\\CallQueuedHandler@call\",\"maxTries\":null,\"maxExceptions\":null,\"failOnTimeout\":false,\"backoff\":null,\"timeout\":null,\"retryUntil\":null,\"data\":{\"commandName\":\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\",\"command\":\"O:48:\\\"Illuminate\\\\Notifications\\\\SendQueuedNotifications\\\":3:{s:11:\\\"notifiables\\\";O:45:\\\"Illuminate\\\\Contracts\\\\Database\\\\ModelIdentifier\\\":5:{s:5:\\\"class\\\";s:15:\\\"App\\\\Models\\\\User\\\";s:2:\\\"id\\\";a:1:{i:0;i:56;}s:9:\\\"relations\\\";a:0:{}s:10:\\\"connection\\\";s:5:\\\"mysql\\\";s:15:\\\"collectionClass\\\";N;}s:12:\\\"notification\\\";O:35:\\\"App\\\\Notifications\\\\LeadStatusUpdated\\\":3:{s:4:\\\"name\\\";s:25:\\\"Mrs. Chelsie Thompson DVM\\\";s:6:\\\"status\\\";s:8:\\\"New Lead\\\";s:2:\\\"id\\\";s:36:\\\"dfe46103-adfc-4544-baaf-53eab6f5050c\\\";}s:8:\\\"channels\\\";a:1:{i:0;s:8:\\\"database\\\";}}\"}}',0,NULL,1703905529,1703905529);

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

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

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

INSERT INTO `migrations` VALUES (379,'2014_10_12_000000_create_users_table',1),(380,'2014_10_12_100000_create_password_reset_tokens_table',1),(381,'2019_08_19_000000_create_failed_jobs_table',1),(382,'2019_12_14_000001_create_personal_access_tokens_table',1),(383,'2023_11_06_062111_update_users_table',1),(384,'2023_11_06_072803_create_staff_table',1),(385,'2023_11_06_081237_create_clients_table',1),(386,'2023_11_06_081803_create_partners_table',1),(387,'2023_11_06_082533_add_partner_relation_to_clients_table',1),(388,'2023_11_06_131339_add_morph_to_users_table',1),(389,'2023_11_10_040007_create_projects_table',1),(390,'2023_11_24_104442_create_phases_table',1),(391,'2023_11_25_063725_create_tasks_table',1),(392,'2023_11_28_063820_create_permissions_table',1),(393,'2023_11_28_070954_create_staff_permissions',1),(394,'2023_11_30_091658_create_supports_table',1),(395,'2023_11_30_092530_create_support_replies_table',1),(396,'2023_12_02_133121_create_attachments_table',1),(397,'2023_12_03_094909_create_categories_table',1),(398,'2023_12_03_094910_create_invoices_table',1),(399,'2023_12_03_103126_create_invoice_items_table',1),(400,'2023_12_04_999999_add_active_status_to_users',1),(401,'2023_12_04_999999_add_avatar_to_users',1),(402,'2023_12_04_999999_add_dark_mode_to_users',1),(403,'2023_12_04_999999_add_messenger_color_to_users',1),(404,'2023_12_04_999999_create_chatify_favorites_table',1),(405,'2023_12_04_999999_create_chatify_messages_table',1),(406,'2023_12_07_100851_create_2_f_a_s_table',1),(407,'2023_12_18_143722_create_notifications_table',1),(408,'2023_12_26_041110_create_plans_table',1),(409,'2023_12_26_042054_create_subscriptions_table',1),(410,'2023_12_26_051729_create_jobs_table',1);

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

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

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

INSERT INTO `notifications` VALUES ('069962d0-8d64-47fb-b581-77dc188eac56','App\\Notifications\\LeadStatusUpdated','App\\Models\\User',46,'{\"message\":\"Status has been updated to Follow Up\"}',NULL,'2023-12-29 12:04:16','2023-12-29 12:04:16'),('182bef06-ffe3-4798-9cd8-ec6ec6ca3ea7','App\\Notifications\\LeadStatusUpdated','App\\Models\\User',46,'{\"message\":\"Status has been updated to New Lead\"}',NULL,'2023-12-29 12:09:15','2023-12-29 12:09:15'),('3aeda798-ed6d-4df3-9b13-f5b51f14bff4','App\\Notifications\\LeadStatusUpdated','App\\Models\\User',46,'{\"message\":\"Status has been updated to Contacted\"}',NULL,'2023-12-29 12:06:21','2023-12-29 12:06:21'),('62903854-42c8-4ee6-b050-10b155571965','App\\Notifications\\LeadStatusUpdated','App\\Models\\User',46,'{\"message\":\"Status has been updated to Contacted\"}',NULL,'2023-12-29 12:02:38','2023-12-29 12:02:38'),('a8dfb600-abf8-427f-b7bb-603347774dfa','App\\Notifications\\LeadStatusUpdated','App\\Models\\User',46,'{\"message\":\"Status has been updated to Contacted\"}',NULL,'2023-12-29 12:11:07','2023-12-29 12:11:07');

--
-- Table structure for table `partners`
--

CREATE TABLE `partners` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `commission` int(10) unsigned NOT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `linkedin` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `partners`
--

INSERT INTO `partners` VALUES (18,50,'www.facebook.com/boehm.mariam','www.linkedin.com/eokon','www.instagram.com/gaylord.alexis'),(19,7,'www.facebook.com/delilah69','www.linkedin.com/cmoore','www.instagram.com/domingo.crooks');

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

CREATE TABLE `permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `permissions` VALUES (1,'leads','2023-12-29 11:59:44','2023-12-29 11:59:44'),(2,'projects','2023-12-29 11:59:44','2023-12-29 11:59:44'),(3,'sales','2023-12-29 11:59:44','2023-12-29 11:59:44'),(4,'clients','2023-12-29 11:59:44','2023-12-29 11:59:44'),(5,'chats','2023-12-29 11:59:44','2023-12-29 11:59:44'),(6,'partners','2023-12-29 11:59:44','2023-12-29 11:59:44'),(7,'invoices','2023-12-29 11:59:44','2023-12-29 11:59:44'),(8,'staff','2023-12-29 11:59:44','2023-12-29 11:59:44'),(9,'support','2023-12-29 11:59:44','2023-12-29 11:59:44'),(10,'emails','2023-12-29 11:59:44','2023-12-29 11:59:44');

--
-- Table structure for table `phases`
--

CREATE TABLE `phases` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `progress` int(10) unsigned NOT NULL DEFAULT 0,
  `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=pending, 1=complete',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `phases_project_id_foreign` (`project_id`),
  CONSTRAINT `phases_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `phases`
--

INSERT INTO `phases` VALUES (45,12,'Et.',36,0,'2023-12-29 11:59:41','2023-12-29 11:59:41'),(46,12,'Ullam.',41,0,'2023-12-29 11:59:41','2023-12-29 11:59:41'),(47,12,'Rerum.',14,0,'2023-12-29 11:59:41','2023-12-29 11:59:41'),(48,12,'Id ut.',94,1,'2023-12-29 11:59:41','2023-12-29 11:59:41');

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

CREATE TABLE `plans` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `price_id` varchar(255) DEFAULT '0',
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `plans` VALUES (1,'silver','price_1ORQCFHymsUfbx7xhGtUSwpP',NULL,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(2,'gold','price_1ORQDzHymsUfbx7xPnV7Hqev',NULL,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(3,'platinum','price_1ORQENHymsUfbx7xUn8WeRgk',NULL,'2023-12-29 11:59:51','2023-12-29 11:59:51'),(4,'diamond','price_1ORQEsHymsUfbx7xM9jVU23C',NULL,'2023-12-29 11:59:51','2023-12-29 11:59:51');

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

CREATE TABLE `projects` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `client_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `billing_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '0=Unpaid, 1=Paid',
  `current_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=Ongoing, 1=Completed',
  `progress` int(10) unsigned NOT NULL DEFAULT 0,
  `img` text DEFAULT NULL,
  `deadline` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `projects_client_id_foreign` (`client_id`),
  CONSTRAINT `projects_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `projects` VALUES (12,4,'Tempora.','Aut enim qui eius tempora id. Id cumque mollitia illo dolorem quia excepturi. Molestiae officia est temporibus blanditiis consequatur debitis.',1,1,30,'thumbnails/project.png','2024-07-13','2023-12-29 11:59:41','2023-12-29 11:59:41');

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `staff`
--

INSERT INTO `staff` VALUES (1),(18),(19);

--
-- Table structure for table `staff_permissions`
--

CREATE TABLE `staff_permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `staff_id` bigint(20) unsigned NOT NULL,
  `permission_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `staff_permissions_staff_id_foreign` (`staff_id`),
  KEY `staff_permissions_permission_id_foreign` (`permission_id`),
  CONSTRAINT `staff_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_permissions_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `staff_permissions`
--

INSERT INTO `staff_permissions` VALUES (1,1,1,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(2,1,2,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(3,1,3,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(4,1,4,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(5,1,5,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(6,1,6,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(7,1,7,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(8,1,8,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(9,1,9,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(10,1,10,'2023-12-29 11:59:44','2023-12-29 11:59:44'),(99,18,1,'2023-12-29 11:59:45','2023-12-29 11:59:45'),(100,18,5,'2023-12-29 11:59:45','2023-12-29 11:59:45'),(101,18,9,'2023-12-29 11:59:45','2023-12-29 11:59:45'),(102,19,4,'2023-12-29 11:59:45','2023-12-29 11:59:45'),(103,19,6,'2023-12-29 11:59:45','2023-12-29 11:59:45'),(104,19,7,'2023-12-29 11:59:45','2023-12-29 11:59:45');

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

CREATE TABLE `subscriptions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `client_id` bigint(20) unsigned NOT NULL,
  `plan_id` bigint(20) unsigned NOT NULL,
  `subscription_id` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `subscriptions_client_id_foreign` (`client_id`),
  KEY `subscriptions_plan_id_foreign` (`plan_id`),
  CONSTRAINT `subscriptions_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `subscriptions_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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


--
-- Table structure for table `support_replies`
--

CREATE TABLE `support_replies` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `support_id` bigint(20) unsigned NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `reply` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `support_replies_user_id_foreign` (`user_id`),
  KEY `support_replies_support_id_foreign` (`support_id`),
  CONSTRAINT `support_replies_support_id_foreign` FOREIGN KEY (`support_id`) REFERENCES `supports` (`id`) ON DELETE CASCADE,
  CONSTRAINT `support_replies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `support_replies`
--

INSERT INTO `support_replies` VALUES (5,13,50,'Expedita dicta vero dolorem pariatur voluptatibus. Quo accusamus pariatur minus ut. Explicabo et est recusandae voluptatem.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(10,12,59,'Eveniet ad voluptas molestiae ipsa. Ut voluptatem ut error esse ipsam autem. Aut minima ut hic nulla. Iure consequatur et dignissimos nostrum qui.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(11,14,18,'Odit cupiditate consectetur sint sed et quibusdam quo. Sunt iusto accusantium ea temporibus aut repudiandae officiis harum. Voluptate omnis nam delectus incidunt rerum eaque.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(12,12,19,'Et maiores ea ipsa soluta autem officia perferendis reprehenderit. Rem earum nesciunt iste ab soluta unde aut. Non aliquam perspiciatis totam quo cumque officiis.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(15,2,57,'Dolor sit debitis odit qui pariatur mollitia. Modi et quas illum culpa molestiae pariatur perferendis. Voluptas et fugit magnam. Vel illo accusantium dignissimos consectetur blanditiis hic maxime.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(17,3,60,'Et dolore cupiditate facere molestias commodi ex. Ut eaque nesciunt error nobis cum. Voluptatum aut omnis beatae et vel aut esse.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(19,16,48,'Eos dolorem et ullam reiciendis qui neque. Perspiciatis est debitis labore voluptas mollitia.','2023-12-29 11:59:47','2023-12-29 11:59:47'),(21,1,1,'<p>Hello&nbsp;</p>','2023-12-29 13:56:34','2023-12-29 13:56:34');

--
-- Table structure for table `supports`
--

CREATE TABLE `supports` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `subject` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `status` enum('open','awaiting_user_response','user_replied','closed') NOT NULL DEFAULT 'open',
  `priority` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=Low, 1=Medium, 2=High',
  `department` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=General, 1=Sales/Billing, 2=Technical',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supports_user_id_foreign` (`user_id`),
  CONSTRAINT `supports_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `supports`
--

INSERT INTO `supports` VALUES (1,48,'Enim.','Maiores velit fuga odio veritatis sapiente eaque architecto. Fuga consequatur maxime sequi rerum veritatis dignissimos voluptatem. Consequuntur quasi dolorum totam aliquam placeat.','closed',0,2,'2023-12-29 11:59:47','2023-12-30 03:04:34'),(2,57,'Totam.','Quo commodi corporis culpa debitis. Sit vitae qui incidunt quibusdam architecto beatae. Exercitationem laboriosam voluptatem iste ut deleniti. Et aut doloremque expedita ea ut.','closed',0,2,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(3,60,'Iure ut.','Eum rerum eum quod quis et quasi beatae voluptas. Incidunt vero odio ut impedit architecto qui quasi. Recusandae commodi voluptatem veniam optio sit accusamus architecto et.','open',2,0,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(4,39,'Aperiam.','Esse et culpa animi velit. Est quia velit facilis quisquam et. Velit vitae aut fugiat dignissimos rem debitis. Voluptate omnis ut sapiente aperiam velit eum cumque.','closed',0,2,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(7,51,'Harum ut.','Porro reprehenderit id est sint ut eos quod. Mollitia rerum laborum quibusdam commodi laudantium voluptatem. Maiores quo qui praesentium sunt expedita fuga mollitia harum.','open',1,2,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(8,59,'Ut sed.','Et quasi id dolorem quo sunt. Quas earum sed odit architecto voluptas eum. Qui ipsam aut eos sapiente et suscipit ratione. Porro incidunt ipsam repellendus nam.','awaiting_user_response',1,0,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(9,44,'Harum.','Neque accusamus explicabo qui quos. Voluptatum quae minus consequatur inventore. Accusantium nulla nostrum iste omnis. Rerum placeat exercitationem est voluptate autem libero quaerat.','awaiting_user_response',0,0,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(11,45,'Et quo.','Quibusdam omnis voluptatem tempora. Debitis consequatur mollitia rerum et dolorem ipsum. Tenetur a quia error inventore.','open',0,1,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(12,59,'Expedita.','Nihil dolor est molestiae odio. Illum doloribus molestiae sint dolor quo voluptas dolore. Autem neque deleniti adipisci sint possimus reprehenderit eos delectus.','user_replied',0,2,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(13,50,'Minima.','Minima fugiat nobis animi quas quaerat doloremque. Sint sed ut itaque laborum. Eos hic eos est et sunt delectus labore. Quidem facilis iste voluptas iure.','user_replied',0,0,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(14,54,'Sit.','Facilis voluptatum quod et placeat eaque quo ut adipisci. Provident non animi officiis distinctio tempora. Enim quod ea sunt et et sed similique.','awaiting_user_response',2,1,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(16,48,'Excepturi.','Eveniet error cumque ut pariatur quas. Nam odit enim quo aut dolore. Non iure qui est provident quia.','open',0,2,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(18,47,'Quia.','Nulla rerum dolorum fuga. Minus qui adipisci quam minus at maxime. Magnam atque quia sed laborum mollitia.','closed',0,2,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(19,60,'Ab maxime.','Facere commodi velit aut maxime aut. Iste dolorum nobis sint fugiat quos et. Distinctio quia earum cumque voluptatem quia fuga. Voluptate quos iste nulla eum.','awaiting_user_response',0,1,'2023-12-29 11:59:47','2023-12-29 11:59:47'),(20,43,'Voluptas.','Facere minus delectus voluptas ab rem sit. Voluptas qui est debitis. Asperiores nihil et rem accusantium voluptatibus. Repellat eum velit consequatur ducimus aliquam voluptatibus aut.','open',1,0,'2023-12-29 11:59:47','2023-12-29 11:59:47');

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

CREATE TABLE `tasks` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `phase_id` bigint(20) unsigned NOT NULL,
  `task` varchar(255) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0=pending, 1=complete',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tasks_phase_id_foreign` (`phase_id`),
  CONSTRAINT `tasks_phase_id_foreign` FOREIGN KEY (`phase_id`) REFERENCES `phases` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=636 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `tasks` VALUES (357,45,'Ut repellendus excepturi magni porro eligendi.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(358,45,'Voluptatem et similique commodi sint.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(359,45,'Recusandae numquam sed est et.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(360,45,'Ut sit et voluptas mollitia.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(361,45,'Fugit corrupti suscipit cupiditate non sed.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(362,45,'Aut aliquam ipsa eveniet porro ab iusto hic.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(363,46,'Amet nam provident distinctio laudantium.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(364,46,'Est id ea non temporibus voluptate.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(365,46,'Animi perspiciatis ipsam et eveniet.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(366,46,'Et tempora corrupti sit nemo voluptas.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(367,46,'Ab ipsum officia pariatur.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(368,46,'Tempore repellendus ea minima quam.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(369,47,'Ullam eum voluptas rem id ullam quas.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(370,47,'Quibusdam consequatur quae aut voluptatem.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(371,47,'Ab cupiditate corrupti amet vitae.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(372,47,'Quis quas illum aut ut. Quo nihil autem et ipsum.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(373,47,'Dolorem eaque in in qui omnis harum.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(374,47,'Modi tempore quisquam aliquam consequatur.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(375,47,'Excepturi et voluptatem qui.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(376,47,'Tempora pariatur sed eaque sapiente.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(377,47,'Aut quae assumenda ullam voluptatem enim a quia.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(378,47,'Velit non est quia libero qui vel non.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(379,48,'Laborum voluptate voluptas omnis tempora.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(380,48,'Voluptatem reiciendis et ut ut sequi.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(381,48,'Ut ut odit quisquam magni voluptates.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(382,48,'Eos laudantium voluptatem nulla tempora et.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(383,48,'Adipisci non quia maxime pariatur dolor dolor.',0,'2023-12-29 11:59:43','2023-12-29 11:59:43'),(384,48,'Sunt in totam fugiat et voluptates.',1,'2023-12-29 11:59:43','2023-12-29 11:59:43');


