-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 03, 2024 at 10:23 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.1.25

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: `sishowroomsinarmas`
--

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

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

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

INSERT INTO `brands` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Toyota', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(2, 'Mitsubishi', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(3, 'Daihatsu', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(4, 'Honda', '2024-06-02 03:28:25', '2024-06-25 12:16:29'),
(5, 'Suzuki', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(6, 'Chevrolet', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(7, 'Peugeot', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(8, 'Hyundai', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(9, 'BMW', NULL, NULL),
(10, 'Isuzu', NULL, NULL),
(11, 'Truk', '2024-06-02 21:26:02', '2024-06-02 21:26:02');

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

--
-- Table structure for table `car_units`
--

CREATE TABLE `car_units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `price` bigint(20) UNSIGNED NOT NULL,
  `brand_id` bigint(20) UNSIGNED NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `year` int(11) NOT NULL,
  `fuel_type` enum('Diesel','Bensin','Listrik') NOT NULL,
  `transmission` enum('Manual','Automatic','CVT','DCT','AMT') NOT NULL,
  `seat` int(11) NOT NULL,
  `warranty` varchar(255) NOT NULL,
  `color` varchar(255) NOT NULL,
  `mileage` int(11) NOT NULL,
  `engine_cc` int(11) NOT NULL,
  `service_book` tinyint(1) NOT NULL,
  `spare_key` tinyint(1) NOT NULL,
  `unit_document` tinyint(1) NOT NULL,
  `stnk_validity_period` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `status` enum('Tersedia','Terjual','Menunggu Verifikasi','Ditolak') NOT NULL DEFAULT 'Tersedia',
  `type` enum('Titipan','Bukan Titipan') NOT NULL DEFAULT 'Bukan Titipan',
  `type_status` enum('Menunggu Verifikasi','Disetujui','Ditolak','Tersedia') NOT NULL DEFAULT 'Tersedia',
  `fee` int(11) 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 `car_units`
--

INSERT INTO `car_units` (`id`, `name`, `price`, `brand_id`, `category_id`, `user_id`, `year`, `fuel_type`, `transmission`, `seat`, `warranty`, `color`, `mileage`, `engine_cc`, `service_book`, `spare_key`, `unit_document`, `stnk_validity_period`, `description`, `status`, `type`, `type_status`, `fee`, `created_at`, `updated_at`) VALUES
(1, 'Trooper Tahun 1993', 50000000, 6, 1, NULL, 1993, 'Bensin', 'Manual', 7, '2 Minggu', 'Hitam', 279037, 2500, 1, 1, 1, 'Pajak off 2019', 'Trooper tahun 1993, aman no minus', 'Tersedia', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-02 03:30:48', '2024-06-25 12:09:40'),
(2, 'Pajero Sport Dakar 4x4 Diesel', 460000000, 2, 1, NULL, 2018, 'Diesel', 'Manual', 7, '1 Bulan', 'Putih', 81948, 2500, 1, 1, 1, 'Pajak panjang sampai november 2027', 'Pajero sport gagah', 'Terjual', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-02 03:33:47', '2024-06-02 04:32:50'),
(3, 'Fortuner VRZ 2017', 455000000, 1, 1, NULL, 2017, 'Diesel', 'Automatic', 7, '3 Minggu', 'Hitam', 41314, 2500, 1, 1, 1, 'Pajak on sampai 2026', 'Fortuner VRZ 2017 antik, full original\r\nKM rendah asli record Toyota', 'Terjual', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-02 03:44:55', '2024-06-02 20:49:11'),
(5, 'Xpander Ultimate 2022', 250000000, 2, 1, NULL, 2022, 'Bensin', 'Automatic', 7, '2 Minggu', 'Hitam', 29000, 1500, 1, 1, 1, 'Panjang', 'Jual Mitsubshi Xpander Ultimate 2022 Nik 2023\r\nKondisi :  \r\n* Matic sangat responsif  \r\n* Body utuh nol spet  \r\n* Kaki kaki senyap no glodak² \r\n* Interior bersih dan wangi bebas asap rokok  \r\n* Electrical normal  semua\r\n* Kilometer 29rb on going  \r\n* Plat asli P tangan pertama dari baru \r\nInsya Allah mobil siap pakai tanpa rawatan. Untuk tanya² lebih lanjut dan serius bisa langsung hubungi telp / wa', 'Terjual', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-02 03:50:43', '2024-06-02 20:47:09'),
(6, 'City RS 2021', 250000000, 4, 3, 4, 2021, 'Bensin', 'Automatic', 5, '1 Minggu', 'Putih', 15200, 1500, 1, 1, 1, 'Sampai 2024', 'Tahun 2021 Pemakaian 2022', 'Tersedia', 'Titipan', 'Disetujui', 5000000, '2024-06-02 04:04:01', '2024-06-02 04:14:30'),
(7, 'Kijang Super Long', 36000000, 1, 4, 4, 1996, 'Diesel', 'Manual', 7, '2 Minggu', 'Gray', 500678, 1500, 1, 1, 1, 'Pajak off 2020', 'Toyota kijang super long 1996 mesin kering, body kempring, power steering, AC nyess alias Poll dingin siap kemana saja tak mahar 36 jta nego yang minat ini jalannya boskuu', 'Tersedia', 'Titipan', 'Disetujui', 720000, '2024-06-02 04:10:13', '2024-06-02 16:49:06'),
(8, 'BMW E36 318i M40 tahun 1993 M/T', 40000000, 9, 2, 5, 1993, 'Bensin', 'Manual', 5, '-', 'Gray', 150000, 1800, 1, 0, 1, 'Lengkap off 2019 pajak 2023 (900rb/thn)', 'Dijual mobil selera anak muda\r\nBMW E36 318i M40 tahun 1993 M/T\r\nNopol N malang\r\nLengkap off 2019 pajak 2023 (900rb/thn)\r\n- Bodykit mtech FRP\r\n- ⁠Spion Mtech FRP\r\n- ⁠Oli baru ganti shell 10w40\r\n- ⁠filter oli baru\r\n- ⁠Velg 323i R16\r\n- ⁠ac dingin\r\n- ⁠bbm irit ( 1/10 dalkot pertalite )\r\nLihat pasti suka 👍🏻\r\nHarga 40jt NEGO tipis', 'Terjual', 'Titipan', 'Disetujui', 800000, '2024-06-02 16:42:44', '2024-06-02 20:51:22'),
(9, 'Pajero Dakar 2021', 525000000, 2, 1, 5, 2021, 'Diesel', 'Automatic', 7, '1 Minggu', 'Hitam', 12567, 2500, 1, 1, 1, 'pajak on bulan 7', 'Monggo yang minat\r\nPajero dakar 2021\r\n\r\nPlat L pajak on bln 7\r\nRemot genap 2\r\nBody mulus original\r\nBan msh tebal bawaan dealer\r\n- full peredam\r\n- sdh power backdoor\r\n\r\nRp 525jt nego smpe deal ditempat', 'Tersedia', 'Titipan', 'Disetujui', 10500000, '2024-06-02 16:47:52', '2024-06-02 16:49:12'),
(10, 'Baleno 2003', 40000000, 5, 3, NULL, 2003, 'Bensin', 'Manual', 5, '2 Minggu', 'Hijau', 123586, 1000, 0, 0, 1, 'Pajak on', 'Suzuki Baleno\r\nTahun 2003\r\n\r\n⚙Sektor Mesin\r\nMesin 1000cc bensin\r\nManual\r\nMesin sehat\r\nTemperatur normal\r\n\r\n\r\n⚙Sektor Interior \r\nPower window\r\nAc dingin \r\nDashboard original\r\nJok original\r\n\r\n⚙Sektor Eksterior\r\nWarna Hijau \r\nTalang air utuh \r\nBukan bekas tabrak dan banjir\r\n\r\nPlat L surabaya\r\nHarga Rp.45.000.000 nego tipis\r\nLokasi mobil Jember JawaTimur', 'Terjual', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-02 16:58:20', '2024-06-26 20:34:07'),
(11, 'Kijang Grand Extra  Tipe LGX KF52', 98700000, 1, 4, NULL, 1994, 'Bensin', 'Manual', 7, '2 Minggu', 'Dongker', 345786, 1500, 0, 0, 1, 'Pajak sampai 2027', 'Toyota Kijang Grand Exrtra \r\nTipe LGX KF52\r\nTahun 1994\r\nTangan ke 2\r\n\r\n⚙Sektor Mesin\r\nMesin 1500cc bensin\r\nManual 5 percepatan\r\nMesin sehat (baru di tune up)\r\nTemperatur normal\r\n\r\n\r\n⚙Sektor Interior \r\nPower window\r\nCentral lock aktif\r\nAc double blower dingin \r\nDashboard original\r\nJok original bludru\r\nKelistrikan normal \r\n\r\n⚙Sektor Eksterior\r\nBodi full kaleng\r\nCat original\r\nTalang air utuh \r\nMinim kropos\r\nBukan bekas tabrak dan banjir\r\n\r\nPlat P Bondowoso\r\nHarga Rp 55.000.000 nego tipis\r\nLokasi mobil Jember JawaTimur', 'Terjual', 'Bukan Titipan', 'Tersedia', 1974000, '2024-06-02 17:08:32', '2024-06-28 02:20:05'),
(12, 'Kijang LGX Tahun 2023', 120000000, 1, 4, NULL, 2003, 'Diesel', 'Manual', 7, '2 Minggu', 'Krem', 200456, 2400, 0, 1, 1, 'Pajak on sampai 2026', 'Toyota Kijang LGX\r\nTahun 2003\r\n\r\n⚙Sektor Mesin\r\nMesin 2400cc diesel\r\nManual\r\nMesin sehat\r\nTemperatur normal\r\n\r\n\r\n⚙Sektor Interior \r\nPower window\r\nAc double blower dingin \r\nDashboard original\r\nJok original bludru\r\nKelistrikan normal \r\n\r\n⚙Sektor Eksterior\r\nBodi full kaleng\r\nCat original (ada spet dikit)\r\nVelg original\r\nTalang air utuh \r\nBukan bekas tabrak dan banjir', 'Terjual', 'Bukan Titipan', 'Tersedia', 2400000, '2024-06-02 17:13:44', '2024-06-30 20:55:59'),
(13, 'Baleno Tahun 1998', 46000000, 5, 2, NULL, 1998, 'Bensin', 'Manual', 5, '2 Minggu', 'Hijau Tua', 98765, 1600, 0, 0, 1, 'Pajak on', 'Sale💸💸\r\nSuzuki Baleno\r\nTahun 1998\r\n\r\n⚙Sektor Mesin\r\nMesin 1600cc bensin\r\nManual\r\n4 silinder  \r\nMesin sehat\r\nTemperatur normal\r\n\r\n\r\n⚙Sektor Interior \r\nPower window\r\nAc dingin \r\nDashboard original\r\nJok original\r\n\r\n⚙Sektor Eksterior\r\nWarna Hijau tua metalik\r\nTalang air utuh \r\nBukan bekas tabrak dan banjir\r\n\r\nPlat P Banyuwangi\r\nPajak per tahun Rp.1.258.500\r\nHarga Rp.46.000.000 nego tipis\r\nLokasi mobil Jember JawaTimur', 'Tersedia', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-02 17:18:54', '2024-06-02 17:18:54'),
(14, 'Fortuner', 535000000, 1, 1, 6, 2021, 'Diesel', 'Manual', 7, '2 Minggu', 'Putih', 2300, 2500, 1, 1, 1, 'Pajak off 2019', 'fortuner tahun 2019', 'Menunggu Verifikasi', 'Titipan', 'Menunggu Verifikasi', 10700000, '2024-06-02 20:44:09', '2024-06-02 20:44:09'),
(15, 'Xpander', 12000000, 1, 1, 6, 2021, 'Diesel', 'Manual', 7, '2 Minggu', 'Putih', 3487, 2500, 1, 1, 1, 'Pajak off 2019', 'no minus', 'Terjual', 'Titipan', 'Disetujui', 240000, '2024-06-02 21:04:47', '2024-06-02 21:20:16'),
(17, 'Trooper Tahun 1993', 50000000, 6, 1, NULL, 1993, 'Bensin', 'Manual', 7, '2 Minggu', 'Hitam', 279037, 2500, 1, 1, 1, 'Pajak off 2019', 'Trooper tahun 1993, aman no minus', 'Tersedia', 'Bukan Titipan', 'Tersedia', NULL, '2024-06-28 02:21:11', '2024-06-28 02:21:11'),
(18, 'Toyota Escargot', 50000000, 1, 1, 3, 1993, 'Bensin', 'Manual', 7, '2 Minggu', 'Hitam', 279037, 2500, 1, 1, 1, 'Pajak off 2019', 'tahun 1993, aman no minus', 'Menunggu Verifikasi', 'Titipan', 'Menunggu Verifikasi', 1000000, '2024-07-02 17:34:15', '2024-07-02 17:34:15'),
(19, 'Trooper Tahun 1993', 50000000, 1, 1, 3, 1993, 'Bensin', 'Manual', 7, '2 Minggu', 'Hitam', 279037, 2500, 1, 1, 1, 'Pajak off 2019', 'tahun 1993, aman no minus', 'Menunggu Verifikasi', 'Titipan', 'Menunggu Verifikasi', 1000000, '2024-07-02 17:40:37', '2024-07-02 17:40:37'),
(20, 'Coba', 50000000, 1, 1, 3, 1993, 'Bensin', 'Manual', 7, '2 Minggu', 'Hitam', 279037, 2500, 1, 1, 1, 'Pajak off 2019', 'tahun 1993, aman no minus', 'Menunggu Verifikasi', 'Titipan', 'Menunggu Verifikasi', 1000000, '2024-07-02 17:47:14', '2024-07-02 17:47:14'),
(21, 'Coba 2', 50000000, 1, 1, 3, 1993, 'Bensin', 'Manual', 7, '2 Minggu', 'Hitam', 279037, 2500, 1, 1, 1, 'Pajak off 2019', 'tahun 1993, aman no minus', 'Menunggu Verifikasi', 'Titipan', 'Menunggu Verifikasi', 1000000, '2024-07-02 17:55:45', '2024-07-02 17:55:45');

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

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

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

INSERT INTO `categories` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'SUV', '2024-06-02 03:28:24', '2024-06-02 03:28:24'),
(2, 'Sedan', '2024-06-02 03:28:24', '2024-06-25 12:09:20'),
(3, 'Hatchback', '2024-06-02 03:28:24', '2024-06-02 03:28:24'),
(4, 'MPV', '2024-06-02 03:28:24', '2024-06-02 03:28:24'),
(5, 'Pick Up', '2024-06-02 03:28:25', '2024-06-02 03:28:25'),
(6, 'LCGC', '2024-06-02 03:28:25', '2024-06-02 03:28:25');

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

--
-- Table structure for table `check_units`
--

CREATE TABLE `check_units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `car_unit_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  `status` enum('Disetujui','Ditolak','Menunggu Verifikasi','Selesai','Dibatalkan Oleh Sistem','Dibatalkan Oleh User','Dibatalkan Oleh Admin') NOT NULL,
  `note` text DEFAULT NULL,
  `payment` varchar(255) DEFAULT NULL,
  `payment_proof` varchar(255) DEFAULT NULL,
  `last_edit_by` bigint(20) UNSIGNED DEFAULT NULL,
  `car_status` 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 `check_units`
--

INSERT INTO `check_units` (`id`, `car_unit_id`, `user_id`, `name`, `phone`, `date`, `time`, `status`, `note`, `payment`, `payment_proof`, `last_edit_by`, `car_status`, `created_at`, `updated_at`) VALUES
(1, 1, 3, NULL, NULL, '2024-06-04', '16:00:00', 'Menunggu Verifikasi', NULL, NULL, NULL, NULL, NULL, '2024-06-02 04:28:46', '2024-06-02 04:28:46'),
(2, 5, 6, NULL, NULL, '2024-06-05', '16:00:00', 'Selesai', NULL, NULL, NULL, 1, 'Terjual', '2024-06-02 20:44:44', '2024-06-03 03:47:08');

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

--
-- 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 `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, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2024_04_22_065801_create_brands_table', 1),
(6, '2024_04_22_065844_create_categories_table', 1),
(7, '2024_04_22_065910_create_car_units_table', 1),
(8, '2024_04_22_065943_create_photos_table', 1),
(9, '2024_04_28_133819_create_check_units_table', 1),
(10, '2024_04_28_134948_create_wishlists_table', 1),
(11, '2024_05_12_173926_create_sales_table', 1);

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

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

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_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 `photos`
--

CREATE TABLE `photos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `car_unit_id` bigint(20) UNSIGNED NOT NULL,
  `file_path` 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 `photos`
--

INSERT INTO `photos` (`id`, `car_unit_id`, `file_path`, `created_at`, `updated_at`) VALUES
(1, 1, 'car-units-photos/2024-06-02443cf322-5a3a-4b66-8827-28444a1fdc39.jpg', '2024-06-02 03:31:18', '2024-06-02 03:31:18'),
(2, 1, 'car-units-photos/2024-06-02WhatsApp Image 2024-04-30 at 12.24.13.jpeg', '2024-06-02 03:31:18', '2024-06-02 03:31:18'),
(3, 1, 'car-units-photos/2024-06-02WhatsApp Image 2024-04-30 at 12.24.15 - Copy.jpeg', '2024-06-02 03:31:19', '2024-06-02 03:31:19'),
(4, 1, 'car-units-photos/2024-06-02WhatsApp Image 2024-04-30 at 12.24.15.jpeg', '2024-06-02 03:31:19', '2024-06-02 03:31:19'),
(5, 1, 'car-units-photos/2024-06-02WhatsApp Image 2024-04-30 at 12.24.17 - Copy.jpeg', '2024-06-02 03:31:19', '2024-06-02 03:31:19'),
(6, 1, 'car-units-photos/2024-06-02WhatsApp Image 2024-04-30 at 12.24.38.jpeg', '2024-06-02 03:31:19', '2024-06-02 03:31:19'),
(8, 1, 'car-units-photos/2024-06-02WhatsApp Image 2024-04-30 at 12.25.14.jpeg', '2024-06-02 03:31:19', '2024-06-02 03:31:19'),
(9, 2, 'car-units-photos/2024-06-02441280238_2669746093184953_7303928955081705877_n.jpg', '2024-06-02 03:40:05', '2024-06-02 03:40:05'),
(10, 2, 'car-units-photos/2024-06-02441282333_2669746436518252_5238976189476619580_n.jpg', '2024-06-02 03:40:05', '2024-06-02 03:40:05'),
(11, 2, 'car-units-photos/2024-06-02441296725_2669746469851582_8537699117765957982_n.jpg', '2024-06-02 03:40:05', '2024-06-02 03:40:05'),
(12, 2, 'car-units-photos/2024-06-02441343009_2669746123184950_2990460754043946176_n.jpg', '2024-06-02 03:40:05', '2024-06-02 03:40:05'),
(13, 2, 'car-units-photos/2024-06-02pajero1.jpg', '2024-06-02 03:40:06', '2024-06-02 03:40:06'),
(14, 3, 'car-units-photos/2024-06-02442425288_8429582363723548_2316306528777716881_n.jpg', '2024-06-02 03:45:15', '2024-06-02 03:45:15'),
(15, 3, 'car-units-photos/2024-06-02442494513_8429561237058994_3411093923960217317_n.jpg', '2024-06-02 03:45:15', '2024-06-02 03:45:15'),
(16, 3, 'car-units-photos/2024-06-02442500849_8429561133725671_3800618947599525234_n.jpg', '2024-06-02 03:45:15', '2024-06-02 03:45:15'),
(17, 3, 'car-units-photos/2024-06-02442508166_8429561263725658_7355920009863860298_n.jpg', '2024-06-02 03:45:15', '2024-06-02 03:45:15'),
(18, 3, 'car-units-photos/2024-06-02443842190_8429561223725662_3459666835538228350_n.jpg', '2024-06-02 03:45:15', '2024-06-02 03:45:15'),
(19, 5, 'car-units-photos/2024-06-02425611270_1173596024021595_2883864804779718041_n.jpg', '2024-06-02 03:51:07', '2024-06-02 03:51:07'),
(20, 5, 'car-units-photos/2024-06-02427089339_953549686449970_2731106462733249285_n.jpg', '2024-06-02 03:51:07', '2024-06-02 03:51:07'),
(21, 5, 'car-units-photos/2024-06-02427186900_280273521819488_8256411062341446960_n.jpg', '2024-06-02 03:51:07', '2024-06-02 03:51:07'),
(22, 5, 'car-units-photos/2024-06-02438077259_290594180760140_5953885926627643719_n.jpg', '2024-06-02 03:51:07', '2024-06-02 03:51:07'),
(23, 6, 'car-units-photos/2024-06-02_1717326241_442386950_1158670158499727_1314149206998366721_n.jpg', '2024-06-02 04:04:01', '2024-06-02 04:04:01'),
(24, 6, 'car-units-photos/2024-06-02_1717326241_444503241_1158670095166400_6370868550045955021_n.jpg', '2024-06-02 04:04:01', '2024-06-02 04:04:01'),
(25, 6, 'car-units-photos/2024-06-02_1717326241_445077309_1158670081833068_8906376198417906273_n.jpg', '2024-06-02 04:04:01', '2024-06-02 04:04:01'),
(26, 6, 'car-units-photos/2024-06-02_1717326242_445096138_1158671601832916_1577848530991869120_n.jpg', '2024-06-02 04:04:02', '2024-06-02 04:04:02'),
(27, 7, 'car-units-photos/2024-06-02_1717326613_445815713_973882950891836_5073673906850203657_n.jpg', '2024-06-02 04:10:13', '2024-06-02 04:10:13'),
(28, 7, 'car-units-photos/2024-06-02_1717326613_447199547_973878120892319_329849016077165867_n.jpg', '2024-06-02 04:10:13', '2024-06-02 04:10:13'),
(29, 7, 'car-units-photos/2024-06-02_1717326613_447210064_973878157558982_726318724342211385_n.jpg', '2024-06-02 04:10:13', '2024-06-02 04:10:13'),
(30, 7, 'car-units-photos/2024-06-02_1717326613_447213537_973878080892323_6500694542045327196_n.jpg', '2024-06-02 04:10:13', '2024-06-02 04:10:13'),
(31, 8, 'car-units-photos/2024-06-02_1717371764_438299038_1084652499286473_8930091872879352474_n.jpg', '2024-06-02 16:42:46', '2024-06-02 16:42:46'),
(32, 8, 'car-units-photos/2024-06-02_1717371767_438300872_1084652489286474_3740209673864815852_n.jpg', '2024-06-02 16:42:47', '2024-06-02 16:42:47'),
(33, 8, 'car-units-photos/2024-06-02_1717371767_438302193_1084652385953151_6764862793497472540_n.jpg', '2024-06-02 16:42:47', '2024-06-02 16:42:47'),
(34, 8, 'car-units-photos/2024-06-02_1717371767_438305172_1084652509286472_5842127186142573945_n.jpg', '2024-06-02 16:42:47', '2024-06-02 16:42:47'),
(35, 8, 'car-units-photos/2024-06-02_1717371767_440931682_1084652442619812_6226942080123482257_n.jpg', '2024-06-02 16:42:47', '2024-06-02 16:42:47'),
(36, 8, 'car-units-photos/2024-06-02_1717371767_440933920_1084658339285889_5776396436693949567_n.jpg', '2024-06-02 16:42:47', '2024-06-02 16:42:47'),
(37, 8, 'car-units-photos/2024-06-02_1717371767_440934792_1084652332619823_2956328905961705365_n.jpg', '2024-06-02 16:42:47', '2024-06-02 16:42:47'),
(38, 9, 'car-units-photos/2024-06-02_1717372072_438914247_3056068157858142_5724953227201878937_n.jpg', '2024-06-02 16:47:52', '2024-06-02 16:47:52'),
(39, 9, 'car-units-photos/2024-06-02_1717372072_441051145_3056062537858704_7728730218492536425_n.jpg', '2024-06-02 16:47:52', '2024-06-02 16:47:52'),
(40, 9, 'car-units-photos/2024-06-02_1717372072_441218519_3056062497858708_2420229495547067733_n.jpg', '2024-06-02 16:47:52', '2024-06-02 16:47:52'),
(41, 9, 'car-units-photos/2024-06-02_1717372072_441244165_3056062611192030_3628225500178677548_n.jpg', '2024-06-02 16:47:52', '2024-06-02 16:47:52'),
(42, 10, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.50.15_d51b63c3.jpg', '2024-06-02 17:01:26', '2024-06-02 17:01:26'),
(43, 10, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.50.15_fe5e5620.jpg', '2024-06-02 17:01:50', '2024-06-02 17:01:50'),
(44, 10, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.50.16_0a7c7790.jpg', '2024-06-02 17:01:50', '2024-06-02 17:01:50'),
(45, 10, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.50.16_88aa0b2a.jpg', '2024-06-02 17:01:50', '2024-06-02 17:01:50'),
(46, 10, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.50.18_deb8ee2d.jpg', '2024-06-02 17:01:50', '2024-06-02 17:01:50'),
(47, 11, 'car-units-photos/2024-06-03kij.jpg', '2024-06-02 17:09:04', '2024-06-02 17:09:04'),
(48, 11, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.51.38_043d5bc3.jpg', '2024-06-02 17:09:16', '2024-06-02 17:09:16'),
(49, 11, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.51.38_1568432f.jpg', '2024-06-02 17:09:16', '2024-06-02 17:09:16'),
(50, 11, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.51.39_98829b4c.jpg', '2024-06-02 17:09:16', '2024-06-02 17:09:16'),
(51, 11, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.51.40_d84e7229.jpg', '2024-06-02 17:09:16', '2024-06-02 17:09:16'),
(52, 11, 'car-units-photos/2024-06-03WhatsApp Image 2024-06-03 at 06.51.40_e87f7aa5.jpg', '2024-06-02 17:09:16', '2024-06-02 17:09:16'),
(53, 12, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.26.27 (1).jpeg', '2024-06-02 17:14:16', '2024-06-02 17:14:16'),
(54, 12, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.26.27 (3).jpeg', '2024-06-02 17:14:47', '2024-06-02 17:14:47'),
(55, 12, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.26.27 (4).jpeg', '2024-06-02 17:14:47', '2024-06-02 17:14:47'),
(56, 12, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.26.27 (5).jpeg', '2024-06-02 17:14:47', '2024-06-02 17:14:47'),
(57, 12, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.26.27 (6).jpeg', '2024-06-02 17:14:47', '2024-06-02 17:14:47'),
(58, 12, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.26.27.jpeg', '2024-06-02 17:14:47', '2024-06-02 17:14:47'),
(59, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08.jpeg', '2024-06-02 17:19:11', '2024-06-02 17:19:11'),
(60, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08 (1).jpeg', '2024-06-02 17:19:44', '2024-06-02 17:19:44'),
(61, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08 (2).jpeg', '2024-06-02 17:19:44', '2024-06-02 17:19:44'),
(62, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08 (3).jpeg', '2024-06-02 17:19:44', '2024-06-02 17:19:44'),
(63, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08 (4).jpeg', '2024-06-02 17:19:44', '2024-06-02 17:19:44'),
(64, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08 (5).jpeg', '2024-06-02 17:19:44', '2024-06-02 17:19:44'),
(65, 13, 'car-units-photos/2024-06-03WhatsApp Image 2024-04-30 at 12.29.08 (6).jpeg', '2024-06-02 17:19:44', '2024-06-02 17:19:44'),
(66, 14, 'car-units-photos/2024-06-03_1717386249_WhatsApp Image 2024-04-30 at 12.26.27 (1).jpeg', '2024-06-02 20:44:10', '2024-06-02 20:44:10'),
(67, 14, 'car-units-photos/2024-06-03_1717386250_WhatsApp Image 2024-04-30 at 12.26.27 (2) - Copy.jpeg', '2024-06-02 20:44:10', '2024-06-02 20:44:10'),
(68, 14, 'car-units-photos/2024-06-03_1717386250_WhatsApp Image 2024-04-30 at 12.26.27 (2).jpeg', '2024-06-02 20:44:10', '2024-06-02 20:44:10'),
(69, 15, 'car-units-photos/2024-06-03_1717387487_WhatsApp Image 2024-04-30 at 12.24.13.jpeg', '2024-06-02 21:04:47', '2024-06-02 21:04:47'),
(70, 15, 'car-units-photos/2024-06-03_1717387487_WhatsApp Image 2024-04-30 at 12.24.15 - Copy.jpeg', '2024-06-02 21:04:47', '2024-06-02 21:04:47'),
(71, 18, 'car-units-photos/2024-07-03_1719966856_WhatsApp Image 2024-04-30 at 12.26.27 (1).jpeg', '2024-07-02 17:34:18', '2024-07-02 17:34:18'),
(72, 19, 'car-units-photos/2024-07-03_1719967237_WhatsApp Image 2024-04-30 at 12.26.27 (1).jpeg', '2024-07-02 17:40:37', '2024-07-02 17:40:37'),
(73, 20, 'car-units-photos/2024-07-03_1719967634_WhatsApp Image 2024-04-30 at 12.24.15.jpeg', '2024-07-02 17:47:14', '2024-07-02 17:47:14'),
(74, 21, 'car-units-photos/2024-07-03_1719968146_WhatsApp Image 2024-04-30 at 12.25.14.jpeg', '2024-07-02 17:55:47', '2024-07-02 17:55:47');

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

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `check_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `car_unit_id` bigint(20) UNSIGNED NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(255) DEFAULT NULL,
  `payment_method` varchar(255) NOT NULL,
  `date` date DEFAULT NULL,
  `last_edit_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;

--
-- Dumping data for table `sales`
--

INSERT INTO `sales` (`id`, `check_unit_id`, `user_id`, `car_unit_id`, `customer_name`, `customer_phone`, `payment_method`, `date`, `last_edit_by`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 2, 'Rudi', '085123456789', 'Tunai', '2024-06-02', 1, '2024-06-02 04:32:50', '2024-06-02 04:32:50'),
(2, 2, 6, 5, 'Hendy', '087654345678', 'Tunai', '2024-06-03', 1, '2024-06-02 20:47:08', '2024-06-02 20:47:08'),
(3, NULL, NULL, 3, 'Hendy Mawarid', '0863838283232', 'Tunai', '2024-06-03', 1, '2024-06-02 20:49:11', '2024-06-02 20:49:11'),
(4, NULL, NULL, 8, 'Hendy', '085123456789', 'Tunai', '2024-06-03', 1, '2024-06-02 20:51:22', '2024-06-02 20:51:22'),
(5, NULL, NULL, 15, 'Hendy Mawarid', '085123456789', 'Kredit', '2024-06-03', 1, '2024-06-02 21:20:16', '2024-06-02 21:20:16'),
(6, NULL, NULL, 10, 'Pak Yanto', '086754673234', 'Tunai', '2024-06-27', 1, '2024-06-26 20:34:07', '2024-06-26 20:34:07'),
(7, NULL, NULL, 11, 'Hendy Mawarid', '087654345678', 'Tunai', '2024-06-28', 1, '2024-06-28 02:20:05', '2024-06-28 02:20:05'),
(8, NULL, NULL, 12, 'Hendy Mawarid', '085123456789', 'Tunai', '2024-07-01', 1, '2024-06-30 20:55:59', '2024-06-30 20:55:59');

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `role` enum('owner','admin','user') NOT NULL DEFAULT 'user',
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT 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`, `phone`, `address`, `role`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', '081234567890', 'Jalan PB. Sudirman, Jember', 'admin', 'admin@gmail.com', NULL, '$2y$12$IEYCVSHuwY6EimLyEFp5qu1vI3rEmdjTQKIvei4LpsJ9JTYYBxZ0i', NULL, '2024-06-02 03:28:23', '2024-06-02 03:28:23'),
(2, 'Owner', '089876543210', 'Jalan PB. Sudirman, Jember', 'owner', 'owner@gmail.com', NULL, '$2y$12$TYGfnQ7Tu3T4JYcgFJAfleMnBs70CloE75CKaqeFkNLSyNA4mDpea', NULL, '2024-06-02 03:28:23', '2024-06-02 03:28:23'),
(3, 'Hendy', '087654321098', 'Jalan Wolter Monginsidi, Jember', 'user', 'hendy@gmail.com', NULL, '$2y$12$1e2ZbYja4Nj2NVyCBeWsL.axJg20383bKDWx2YaZzoci0Kxod3QEa', NULL, '2024-06-02 03:28:24', '2024-06-02 03:28:24'),
(4, 'Daffa Afifi', '087654321099', 'Jalan Nangka, Jember', 'user', 'daffa@gmail.com', NULL, '$2y$12$m7vI6kJKEeAfvrwOAaRdWefg1tsGBH2hRvvF43//3sNxvukbjsxpe', NULL, '2024-06-02 03:28:24', '2024-06-02 03:28:24'),
(5, 'Zidan', '087654345678', 'Jalan mana aja, Probolinggo', 'user', 'zidan@gmail.com', '2024-06-02 16:38:39', '$2y$12$cuVaHjkw/SKAXd5T0bh5Iuh2ecza3jIST3QMLL6Yid/JsB3Ny4YBO', NULL, '2024-06-02 16:37:06', '2024-06-02 16:38:39'),
(6, 'Hendy', '087654345678', 'Jalan Mastrip, Jember', 'user', 'hendymrd@gmail.com', '2024-06-02 20:42:17', '$2y$12$ECZsewLxT2WuFbfJLgJUpOcPn8gV8l4tntA9UDEgFvrVpiDYh.JFm', NULL, '2024-06-02 20:41:23', '2024-06-26 21:17:43');

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

--
-- Table structure for table `wishlists`
--

CREATE TABLE `wishlists` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `car_unit_id` bigint(20) UNSIGNED NOT NULL,
  `user_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;

--
-- Dumping data for table `wishlists`
--

INSERT INTO `wishlists` (`id`, `car_unit_id`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 5, 3, '2024-06-02 04:21:52', '2024-06-02 04:21:52'),
(2, 3, 3, '2024-06-02 04:21:56', '2024-06-02 04:21:56'),
(3, 9, 6, '2024-06-02 20:44:54', '2024-06-02 20:44:54');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `car_units`
--
ALTER TABLE `car_units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `car_units_brand_id_foreign` (`brand_id`),
  ADD KEY `car_units_category_id_foreign` (`category_id`),
  ADD KEY `car_units_user_id_foreign` (`user_id`);

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

--
-- Indexes for table `check_units`
--
ALTER TABLE `check_units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `check_units_car_unit_id_foreign` (`car_unit_id`),
  ADD KEY `check_units_user_id_foreign` (`user_id`),
  ADD KEY `check_units_last_edit_by_foreign` (`last_edit_by`);

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

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

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

--
-- Indexes for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);

--
-- Indexes for table `photos`
--
ALTER TABLE `photos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `photos_car_unit_id_foreign` (`car_unit_id`);

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_check_unit_id_foreign` (`check_unit_id`),
  ADD KEY `sales_user_id_foreign` (`user_id`),
  ADD KEY `sales_car_unit_id_foreign` (`car_unit_id`),
  ADD KEY `sales_last_edit_by_foreign` (`last_edit_by`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- Indexes for table `wishlists`
--
ALTER TABLE `wishlists`
  ADD PRIMARY KEY (`id`),
  ADD KEY `wishlists_car_unit_id_foreign` (`car_unit_id`),
  ADD KEY `wishlists_user_id_foreign` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `car_units`
--
ALTER TABLE `car_units`
  ADD CONSTRAINT `car_units_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `car_units_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `car_units_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `check_units`
--
ALTER TABLE `check_units`
  ADD CONSTRAINT `check_units_car_unit_id_foreign` FOREIGN KEY (`car_unit_id`) REFERENCES `car_units` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `check_units_last_edit_by_foreign` FOREIGN KEY (`last_edit_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `check_units_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `photos`
--
ALTER TABLE `photos`
  ADD CONSTRAINT `photos_car_unit_id_foreign` FOREIGN KEY (`car_unit_id`) REFERENCES `car_units` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sales`
--
ALTER TABLE `sales`
  ADD CONSTRAINT `sales_car_unit_id_foreign` FOREIGN KEY (`car_unit_id`) REFERENCES `car_units` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `sales_check_unit_id_foreign` FOREIGN KEY (`check_unit_id`) REFERENCES `check_units` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `sales_last_edit_by_foreign` FOREIGN KEY (`last_edit_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `sales_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `wishlists`
--
ALTER TABLE `wishlists`
  ADD CONSTRAINT `wishlists_car_unit_id_foreign` FOREIGN KEY (`car_unit_id`) REFERENCES `car_units` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `wishlists_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 */;
