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

START TRANSACTION;



--
-- Database: `aicolcco_aicoapp`
--

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

--
-- Table structure for table `doc_uploads`
--

CREATE TABLE `doc_uploads` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `file` text NOT NULL,
  `originalName` text NOT NULL,
  `position` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `doctype` varchar(191) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `doc_uploads`
--

INSERT INTO `doc_uploads` (`id`, `user_id`, `file`, `originalName`, `position`, `created_at`, `updated_at`, `doctype`) VALUES
(1, 10, '10_mCCJZWZAUsZxm6vFiEHGhIO4bhhPu2Rf4jHiAjMn.jpg', 'WhatsApp Image 2021-12-20 at 13.30.19.jpeg', 0, '2022-10-06 03:14:54', '2022-10-06 03:14:54', ''),
(3, 10, '10_QoaINxRKcpLMoFU5cUrHt4iKKfzDrNaTLqffMf9H.pdf', 'Tranzactie_22-09-2022_20-25-55.pdf', 1, '2022-10-06 03:15:05', '2022-10-06 03:15:05', ''),
(5, 10, '10_MEhe1ERYSf0c6wpyXSyqMRKvHJtPSA3FoPhh9yY1.pdf', '10_iRcOSzkfZQj2bp6xOFguiUR2jazo34Wsmov6Xokz.pdf', 0, '2022-10-06 03:24:25', '2022-10-06 03:24:25', ''),
(6, 12, '12_9FXp0JWCdhTyzfSbmJhiSuDA7mbSoGs2mEelFNHH.pdf', 'Dover Hamilton Ltd - Presentation.pdf', 0, '2022-10-06 03:42:48', '2022-10-06 03:42:48', ''),
(7, 11, '11_FFdL0CMSAXLn2iWFnn1DDWVjeBs6XNG6rYfR9wD5.jpg', 'WhatsApp Image 2022-10-19 at 21.27.16.jpeg', 0, '2022-10-24 07:10:44', '2022-10-24 07:10:44', ''),
(8, 24, '24_Z66A3do7WiwRfXFuFZL1fk3j4hQvHtMCLNTcrURW.pdf', 'Fin Conta Cost Martie-Mai 2022.pdf', 0, '2022-11-01 18:36:09', '2022-11-01 18:36:09', ''),
(11, 24, '24_Q6t1Y0QlJeZmzxDnPK1yNHP5O0tQru91OcizwyqX.pdf', 'FacturaGNS0176.pdf', 0, '2022-11-02 23:49:05', '2022-11-02 23:49:05', ''),
(12, 9, '9_cqNh1ag3CUMuQa9SalkvxgyojbR9bU5wFWMKcgGX.pdf', 'Fin Conta Cost Martie-Mai 2022.pdf', 0, '2022-11-02 23:52:13', '2022-11-02 23:52:13', ''),
(16, 24, '24_GUxf2SbUHcnp2pi61Pu1gUbeu3b5vc7xmcZ52LPc.jpg', 'msg.jpg', 0, '2022-11-07 15:41:52', '2022-11-07 15:41:52', 'trader'),
(19, 24, '24_NZ5SDviGjadYTXVRK0bGOSHdrUmApFRzdEUBJcEy.pdf', 'contract_servicii_semnat.pdf', 0, '2022-11-07 16:42:21', '2022-11-07 16:42:21', 'trader'),
(20, 24, '24_83HxBO9qGX1LYnpY2NMMOkND39VKTyKGzYg0QjNK.pdf', 'factura_anulata_8305.pdf', 0, '2022-11-07 16:43:06', '2022-11-07 16:43:06', 'aico');

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

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

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

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

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

CREATE TABLE `invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `job_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `file` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `reference` varchar(191) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `lrn` varchar(191) DEFAULT NULL,
  `type_of_entry` int(11) NOT NULL,
  `gmr` int(11) NOT NULL,
  `port_uk` int(11) DEFAULT NULL,
  `port_eu` int(11) DEFAULT NULL,
  `truck` varchar(191) DEFAULT NULL,
  `trailer` varchar(191) DEFAULT NULL,
  `status` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `reason` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `jobs` (`id`, `reference`, `customer_id`, `lrn`, `type_of_entry`, `gmr`, `port_uk`, `port_eu`, `truck`, `trailer`, `status`, `created_at`, `updated_at`, `reason`) VALUES
(1, 'dov220001', 10, NULL, 1, 1, 4, 22, 'B-3124123', 'hhg544', 5, '2022-10-06 03:15:06', '2022-10-10 03:18:34', NULL),
(2, 'dov220002', 10, NULL, 2, 1, 9, 18, 'gdfg22', '2dfgdf', 4, '2022-10-06 03:15:44', '2022-10-10 09:59:56', NULL),
(3, 'dov220003', 10, 'lrntest312', 4, 1, 5, 17, 'gdfg22', '2dfgdf', 2, '2022-10-06 03:24:29', '2022-10-17 08:57:52', ''),
(4, 'dov220004', 12, NULL, 1, 1, 1, 15, 'AR75BBO', 'AR76BBO', 3, '2022-10-06 03:42:48', '2022-10-14 09:47:29', NULL),
(5, 'dov220005', 11, NULL, 2, 0, NULL, NULL, NULL, NULL, 3, '2022-10-24 07:10:44', '2022-10-25 11:43:44', NULL),
(6, 'dov220006', 24, NULL, 1, 1, 3, 18, 'B-312334', 'jf54634', 1, '2022-11-01 18:36:11', '2022-11-01 18:36:11', NULL),
(7, 'dov220007', 24, '12ed', 2, 1, 1, 18, 'gdfg22', 'hhg544', 3, '2022-11-02 23:43:33', '2022-11-04 13:25:09', NULL),
(8, 'dov220008', 24, NULL, 2, 1, 1, 18, 'gdfg22', 'hhg544', 1, '2022-11-02 23:48:58', '2022-11-02 23:48:58', NULL);

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

--
-- Table structure for table `jobs_downloads`
--

CREATE TABLE `jobs_downloads` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `job_id` int(11) NOT NULL,
  `document` int(11) 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 `jobs_downloads`
--

INSERT INTO `jobs_downloads` (`id`, `job_id`, `document`, `created_at`, `updated_at`) VALUES
(1, 7, 12, '2022-11-02 23:52:17', '2022-11-02 23:52:17');

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

--
-- Table structure for table `jobs_statuses`
--

CREATE TABLE `jobs_statuses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(191) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `jobs_statuses`
--

INSERT INTO `jobs_statuses` (`id`, `status`) VALUES
(1, 'New Job'),
(2, 'Work in progress'),
(3, 'Ready'),
(4, 'Completed'),
(5, 'Rejected');

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

--
-- Table structure for table `jobs_uploads`
--

CREATE TABLE `jobs_uploads` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `job_id` int(11) NOT NULL,
  `document` int(11) 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 `jobs_uploads`
--

INSERT INTO `jobs_uploads` (`id`, `job_id`, `document`, `created_at`, `updated_at`) VALUES
(23, 1, 1, '2022-10-06 03:15:06', '2022-10-06 03:15:06'),
(24, 1, 3, '2022-10-06 03:15:06', '2022-10-06 03:15:06'),
(27, 3, 5, '2022-10-06 03:24:29', '2022-10-06 03:24:29'),
(28, 4, 6, '2022-10-06 03:42:48', '2022-10-06 03:42:48'),
(29, 5, 7, '2022-10-24 07:10:44', '2022-10-24 07:10:44'),
(30, 6, 8, '2022-11-01 18:36:11', '2022-11-01 18:36:11'),
(31, 7, 9, '2022-11-02 23:48:28', '2022-11-02 23:48:28'),
(32, 8, 10, '2022-11-02 23:48:58', '2022-11-02 23:48:58'),
(33, 8, 11, '2022-11-07 13:59:58', '2022-11-07 13:59:58'),
(34, 8, 13, '2022-11-07 13:59:58', '2022-11-07 13:59:58'),
(35, 7, 14, '2022-11-07 14:00:45', '2022-11-07 14:00:45'),
(36, 7, 16, '2022-11-07 15:42:06', '2022-11-07 15:42:06'),
(38, 7, 19, '2022-11-07 16:42:22', '2022-11-07 16:42:22'),
(39, 7, 20, '2022-11-07 16:43:06', '2022-11-07 16:43:06');

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

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sender` varchar(191) NOT NULL,
  `job_id` int(11) NOT NULL,
  `department` varchar(191) NOT NULL,
  `message` text NOT NULL,
  `status` int(11) 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 `messages`
--

INSERT INTO `messages` (`id`, `sender`, `job_id`, `department`, `message`, `status`, `created_at`, `updated_at`) VALUES
(2, '10', 3, 'general_question', 'Hello', 1, '2022-10-19 07:30:17', '2022-11-01 19:28:32'),
(3, '7', 3, 'general_question', 'Hello sir', 1, '2022-10-19 07:30:17', '2022-11-01 19:28:32'),
(4, '10', 3, 'general_question', 'I have a question', 1, '2022-10-19 07:38:53', '2022-11-01 19:28:32'),
(5, '10', 3, 'general_question', 'Can you help me?', 1, '2022-10-19 07:39:02', '2022-11-01 19:28:32'),
(6, '10', 3, 'invoice', 'Hello invoice', 0, '2022-10-19 07:59:56', '2022-10-19 07:59:56'),
(22, '11', 5, 'general_question', 'hello', 0, '2022-10-24 08:24:43', '2022-10-24 08:24:43'),
(23, '7', 5, 'general_question', 'Hello', 0, '2022-10-24 08:26:47', '2022-10-24 08:26:47'),
(24, '11', 5, 'general_question', 'question', 0, '2022-10-24 08:26:54', '2022-10-24 08:26:54'),
(25, '7', 5, 'general_question', 'how can i help ?', 0, '2022-10-24 08:27:01', '2022-10-24 08:27:01'),
(26, '11', 5, 'general_question', 'asd', 0, '2022-10-24 08:27:04', '2022-10-24 08:27:04'),
(27, '7', 5, 'general_question', 'asdd2', 0, '2022-10-24 08:28:04', '2022-10-24 08:28:04'),
(28, '7', 5, 'general_question', 'dfs', 0, '2022-10-24 09:45:21', '2022-10-24 09:45:21'),
(29, '11', 5, 'general_question', 'yes', 0, '2022-10-24 10:09:32', '2022-10-24 10:09:32'),
(30, '11', 5, 'general_question', 'asd', 0, '2022-10-24 10:10:33', '2022-10-24 10:10:33'),
(31, '11', 5, 'general_question', 'fghdfg', 0, '2022-10-24 10:10:42', '2022-10-24 10:10:42'),
(32, '7', 5, 'general_question', '4312', 0, '2022-10-24 10:10:50', '2022-10-24 10:10:50'),
(33, '11', 5, 'import_export', 'import question', 0, '2022-10-24 10:28:14', '2022-10-24 10:28:14'),
(34, '9', 3, 'invoice', 'Response invoice', 0, '2022-10-25 09:32:43', '2022-10-25 09:32:43'),
(35, '9', 3, 'invoice', 'hello', 0, '2022-10-25 09:33:36', '2022-10-25 09:33:36'),
(36, '11', 5, 'import_export', 'mistake message', 0, '2022-10-25 09:42:06', '2022-10-25 09:42:06'),
(37, '11', 5, 'complaint', 'Hello complaint', 1, '2022-10-25 09:42:16', '2022-11-01 19:56:38'),
(38, '11', 5, 'invoice', 'Invoice message hello', 0, '2022-10-25 09:42:25', '2022-10-25 09:42:25'),
(39, '6', 5, 'complaint', 'yes. hello', 1, '2022-10-25 09:42:37', '2022-11-01 19:56:38'),
(40, '8', 5, 'import_export', 'ready', 0, '2022-10-25 11:43:58', '2022-10-25 11:43:58'),
(41, '10', 3, 'complaint', 'Hello i want to make a complaint', 0, '2022-10-27 10:46:06', '2022-10-27 10:46:06'),
(42, '6', 3, 'complaint', 'hello. what is about ?', 0, '2022-10-27 10:46:18', '2022-10-27 10:46:18'),
(43, '24', 6, 'general_question', 'General question test Eugen2', 0, '2022-11-01 18:37:23', '2022-11-01 18:37:23');

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

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

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

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(17, '2022_09_15_045736_create_jobs_table', 6),
(6, '2022_09_08_103704_add_fields_to_users', 1),
(7, '2022_09_15_044544_create_ports_table', 2),
(16, '2022_09_15_050922_create_jobs_downloads_table', 5),
(15, '2022_09_15_050740_create_jobs_uploads_table', 5),
(11, '2022_09_15_125419_create_types_of_entries_table', 3),
(12, '2022_09_15_130639_create_jobs_statuses_table', 3),
(18, '2022_09_20_160809_create_doc_uploads_table', 7),
(25, '2022_09_23_112816_create_messages_table', 12),
(20, '2022_09_26_080257_add_doctype_to_doc_uploads', 9),
(21, '2022_09_28_071414_add_reason_to_users', 10),
(22, '2022_10_14_130244_add_reason_to_jobs', 11),
(26, '2022_11_02_080457_create_invoices_table', 13);

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

--
-- Table structure for table `ports`
--

CREATE TABLE `ports` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `port` varchar(191) NOT NULL,
  `location` varchar(191) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ports`
--

INSERT INTO `ports` (`id`, `port`, `location`) VALUES
(1, 'Dover', 'UK'),
(2, 'Eurotunnel (Folkstone)', 'UK'),
(3, 'Fishguard', 'UK'),
(4, 'Heysham', 'UK'),
(5, 'Holyhead', 'UK'),
(6, 'Liverpool', 'UK'),
(7, 'Newhaven', 'UK'),
(8, 'Pembroke', 'UK'),
(9, 'Plymouth', 'UK'),
(10, 'Poole', 'UK'),
(11, 'Portsmouth', 'UK'),
(12, 'Sheerness', 'UK'),
(13, 'Bilbao', 'EU'),
(14, 'Caen', 'EU'),
(15, 'Calais', 'EU'),
(16, 'Cherbourg', 'EU'),
(17, 'Dieppe', 'EU'),
(18, 'Dublin', 'EU'),
(19, 'Dunkirk', 'EU'),
(20, 'Le Havre', 'EU'),
(21, 'Leixoes', 'EU'),
(22, 'Roscoff', 'EU'),
(23, 'Rosslare', 'EU'),
(24, 'Santander', 'EU'),
(25, 'St Malo', 'EU');

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

--
-- Table structure for table `types_of_entries`
--

CREATE TABLE `types_of_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(191) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `types_of_entries`
--

INSERT INTO `types_of_entries` (`id`, `type`) VALUES
(1, 'Export'),
(2, 'Import'),
(3, 'T1'),
(4, 'Export + T1');

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  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=9;

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `types_of_entries`
--
ALTER TABLE `types_of_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;

