-- Table structure for table `customers`
--

CREATE TABLE IF NOT EXISTS `customers` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `customer_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `customer_address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `customer_color_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_logo` mediumblob,
  `customer_logo_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `added_by` int NOT NULL,
  `is_active` tinyint DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `customer_name`, `customer_address`, `customer_color_code`, `customer_logo`, `customer_logo_path`, `added_by`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Mortgage Connect', '5901 N Honore Ave Suite 200, Sarasota, FL 34243, United States', '#990000', 0x[BLOB], 'customer_logo/1686954739.png', 1, 1, NULL, NULL);

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

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

CREATE TABLE IF NOT EXISTS `orders` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `batch_id` int NOT NULL,
  `org_id` int NOT NULL,
  `jpm_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `seller_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `property_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `property_city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `property_state` int DEFAULT NULL,
  `property_county` int DEFAULT NULL,
  `property_zip` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `property_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `orign_loan_print_bal` decimal(10,2) DEFAULT NULL,
  `orign_date` date DEFAULT NULL,
  `orign_maturity_date` date DEFAULT NULL,
  `borrower_lastname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `borrower_firstname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `co_borrower_lastname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `co_borrower_firstname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dq_muni_order` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_id` int DEFAULT NULL,
  `added_by` int NOT NULL,
  `assigned_to` int DEFAULT NULL,
  `is_active` tinyint DEFAULT '1',
  `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_unicode_ci;

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

--
-- Table structure for table `orders_export_data`
--

CREATE TABLE IF NOT EXISTS `orders_export_data` (
  `id` int NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `app_number` int NOT NULL,
  `mc_order_id` int DEFAULT NULL,
  `batch_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `loan_ref_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `applicants` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `completion_date` date DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parcel_count` int DEFAULT NULL,
  `parcel_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `county` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `water_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `water_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `water_connected` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `water_amt_due` decimal(10,2) DEFAULT '0.00',
  `water_past_due` decimal(10,2) DEFAULT '0.00',
  `water_due_date` date DEFAULT NULL,
  `sewer_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `sewer_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sewer_amt_due` decimal(10,2) DEFAULT '0.00',
  `sewer_past_due` decimal(10,2) DEFAULT '0.00',
  `sewer_due_date` date DEFAULT NULL,
  `garbage_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `garbage_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `garbage_amt_due` decimal(10,2) DEFAULT '0.00',
  `garbage_past_due` decimal(10,2) DEFAULT '0.00',
  `garbage_due_date` date DEFAULT NULL,
  `other_utility_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `utility_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `utility_amt_due` decimal(10,2) DEFAULT '0.00',
  `utility_past_due` decimal(10,2) DEFAULT '0.00',
  `utility_due_date` date DEFAULT NULL,
  `code_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `code_amt_due` decimal(10,2) DEFAULT '0.00',
  `special_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `special_amt_due` decimal(10,2) DEFAULT '0.00',
  `permit_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `demolition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `demolition_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `code_violation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `permits` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `special_assessment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `demolition_permit` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `utility` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `pdf_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `merged_pdf` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `orders_status_history`
--

CREATE TABLE IF NOT EXISTS `orders_status_history` (
  `id` int NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `status_id` int DEFAULT NULL,
  `followup_date` date DEFAULT NULL,
  `eta_date` date DEFAULT NULL,
  `comments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `added_by` int DEFAULT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `organizations`
--

CREATE TABLE IF NOT EXISTS `organizations` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `org_name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_no` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_id` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `org_logo` mediumblob,
  `org_logo_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `organizations`
--

INSERT INTO `organizations` (`id`, `org_name`, `phone_no`, `email_id`, `address`, `org_logo`, `org_logo_path`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Stellar Innovations', '9620666331', 'yuva@stellaripl.com', 'Silk Board, Bangalore, India', 0x[BLOB], 'logo/1685327357.png', 1, NULL, NULL);
INSERT INTO `organizations` (`id`, `org_name`, `phone_no`, `email_id`, `address`, `org_logo`, `org_logo_path`, `is_active`, `created_at`, `updated_at`) VALUES
(2, 'Stellar - Client View', '9620666331', 'yuva@stellaripl.com', 'Silk Board, Bangalore, India', 0x[BLOB], 'logo/1685326852.png', 1, NULL, NULL);
INSERT INTO `organizations` (`id`, `org_name`, `phone_no`, `email_id`, `address`, `org_logo`, `org_logo_path`, `is_active`, `created_at`, `updated_at`) VALUES
(3, 'PropLogix', '+1 941-444-7142', 'support@proplogix.com', '5901 N Honore Ave,\r\nSarasota, FL 34243', 0x[BLOB]