-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 26, 2025 at 07:09 AM
-- Server version: 8.0.30
-- PHP Version: 8.2.27

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

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

--
-- Table structure for table `bookings`
--

CREATE TABLE `bookings` (
  `id` bigint UNSIGNED NOT NULL,
  `customer_id` bigint UNSIGNED NOT NULL,
  `tailor_id` bigint UNSIGNED NOT NULL,
  `appointment_date` date NOT NULL,
  `appointment_time` time NOT NULL,
  `service_type` enum('Perbaikan','Jahit Baru') COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` enum('Atasan','Bawahan','Terusan') COLLATE utf8mb4_unicode_ci NOT NULL,
  `design_photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `notes` text COLLATE utf8mb4_unicode_ci,
  `status` enum('reservasi','diproses','selesai','dibatalkan') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'reservasi',
  `total_price` decimal(10,2) DEFAULT NULL,
  `payment_status` enum('unpaid','paid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'unpaid',
  `measurements` json DEFAULT NULL,
  `repair_details` json DEFAULT NULL,
  `repair_photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `repair_notes` text COLLATE utf8mb4_unicode_ci,
  `completion_photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `completion_notes` text COLLATE utf8mb4_unicode_ci,
  `accepted_at` timestamp NULL DEFAULT NULL,
  `rejected_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `rejection_reason` text COLLATE utf8mb4_unicode_ci,
  `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 `bookings`
--

INSERT INTO `bookings` (`id`, `customer_id`, `tailor_id`, `appointment_date`, `appointment_time`, `service_type`, `category`, `design_photo`, `notes`, `status`, `total_price`, `payment_status`, `measurements`, `repair_details`, `repair_photo`, `repair_notes`, `completion_photo`, `completion_notes`, `accepted_at`, `rejected_at`, `completed_at`, `rejection_reason`, `created_at`, `updated_at`) VALUES
(1, 5, 2, '2025-03-26', '09:00:00', 'Jahit Baru', 'Atasan', 'designs/design1.jpg', 'Mau warna merah maroon', 'reservasi', '500000.00', 'paid', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(2, 6, 3, '2025-03-27', '10:00:00', 'Jahit Baru', 'Bawahan', 'designs/design2.jpg', 'Mau warna hitam', 'diproses', '350000.00', 'paid', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(3, 7, 4, '2025-03-25', '11:00:00', 'Perbaikan', 'Atasan', 'designs/design3.jpg', 'Perbaikan jahitan yang lepas', 'selesai', '100000.00', 'paid', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(4, 13, 3, '2025-04-01', '14:00:00', 'Jahit Baru', 'Bawahan', NULL, 'Jahit celana panjang dengan bahan katun', 'reservasi', NULL, 'unpaid', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-25 00:59:47', '2025-03-25 00:59:47'),
(5, 13, 3, '2025-04-01', '14:00:00', 'Jahit Baru', 'Bawahan', NULL, 'Celana bahan katun warna hitam', 'reservasi', NULL, 'unpaid', '[{\"name\": \"lingkar_pinggang\", \"unit\": \"cm\", \"value\": 82}, {\"name\": \"lingkar_pinggul\", \"unit\": \"cm\", \"value\": 96}, {\"name\": \"panjang_celana\", \"unit\": \"cm\", \"value\": 98}, {\"name\": \"lingkar_paha\", \"unit\": \"cm\", \"value\": 58}, {\"name\": \"lingkar_lutut\", \"unit\": \"cm\", \"value\": 40}, {\"name\": \"lingkar_kaki\", \"unit\": \"cm\", \"value\": 32}]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-25 01:10:03', '2025-03-25 01:10:03');

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

--
-- Table structure for table `cache`
--

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

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

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

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

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

--
-- Table structure for table `customer_specialization`
--

CREATE TABLE `customer_specialization` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `tailor_specialization_id` bigint 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 `customer_specialization`
--

INSERT INTO `customer_specialization` (`id`, `user_id`, `tailor_specialization_id`, `created_at`, `updated_at`) VALUES
(1, 13, 3, NULL, NULL),
(2, 13, 5, NULL, NULL),
(3, 13, 9, NULL, NULL);

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000001_create_cache_table', 1),
(2, '0001_01_01_000002_create_jobs_table', 1),
(3, '2014_10_12_000000_create_users_table', 1),
(4, '2024_03_23_000000_create_tailor_services_table', 1),
(5, '2024_03_23_create_bookings_table', 1),
(6, '2024_03_23_create_tailor_ratings_table', 1),
(7, '2024_03_23_create_tailor_specializations_table', 1),
(8, '2025_03_23_110103_create_sessions_table', 1),
(9, '2025_03_23_112534_create_personal_access_tokens_table', 1),
(10, '2025_03_25_052708_add_measurements_to_bookings_table', 2),
(11, '2025_03_25_053140_add_measurements_to_bookings_table', 3),
(12, '2025_03_25_061103_create_customer_specialization_table', 4),
(13, '2025_03_25_061144_add_coordinates_to_users_table', 4);

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

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `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;

--
-- Dumping data for table `personal_access_tokens`
--

INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES
(1, 'App\\Models\\User', 5, 'auth_token', 'dc8aad22726b2620400823a768aae1d50ff7083060329e0ae95face9c68efc84', '[\"pelanggan\"]', NULL, NULL, '2025-03-24 14:23:02', '2025-03-24 14:23:02'),
(2, 'App\\Models\\User', 5, 'auth_token', 'f4373cc940078dba95fe744bc48e156608c62347e6430e7572c0eafe3cd7218b', '[\"pelanggan\"]', NULL, NULL, '2025-03-24 19:45:13', '2025-03-24 19:45:13'),
(3, 'App\\Models\\User', 8, 'auth_token', '6148f1621c3cfbef6d73ec190e9ecdd55e927331cf7b02214913c26869eb9dac', '[\"penjahit\"]', NULL, NULL, '2025-03-24 19:53:50', '2025-03-24 19:53:50'),
(4, 'App\\Models\\User', 8, 'auth_token', '432479a848414daeaf459835ea2e5b0ea6e23af676f7a48da9986cb3b013953e', '[\"penjahit\"]', NULL, NULL, '2025-03-24 19:57:18', '2025-03-24 19:57:18'),
(5, 'App\\Models\\User', 8, 'auth_token', 'a67932230ec732266da178298ac58f2465d93af4fce42477ff5c455a52522a52', '[\"penjahit\"]', '2025-03-24 20:19:49', NULL, '2025-03-24 20:02:50', '2025-03-24 20:19:49'),
(6, 'App\\Models\\User', 8, 'auth_token', '47b5668ff061e75ed9e5cb9885540c5ef27d92e6647fc6c8436e73666cb61d7a', '[\"penjahit\"]', '2025-03-24 20:25:40', NULL, '2025-03-24 20:21:25', '2025-03-24 20:25:40'),
(7, 'App\\Models\\User', 9, 'auth_token', '353dba4ffaf35a2b490b73f4c91101b41cfd656c22c58e1376aba64058b90c2f', '[\"penjahit\"]', NULL, NULL, '2025-03-24 21:02:57', '2025-03-24 21:02:57'),
(8, 'App\\Models\\User', 10, 'auth_token', '529bebe81179ed1280f608629196a794cbe6a6a9435a72874ffe345673925421', '[\"penjahit\"]', NULL, NULL, '2025-03-24 21:06:15', '2025-03-24 21:06:15'),
(9, 'App\\Models\\User', 10, 'auth_token', '57f803b9d036fb98a88f4ebba3c0a5a9acdde3cb6ab48348f500134b3353d5fc', '[\"penjahit\"]', '2025-03-24 21:45:01', NULL, '2025-03-24 21:12:03', '2025-03-24 21:45:01'),
(10, 'App\\Models\\User', 11, 'auth_token', '36b5daf355b146dda015b338781bb4c63d2c711d015a7e8038f734e46c620466', '[\"pelanggan\"]', NULL, NULL, '2025-03-24 23:02:48', '2025-03-24 23:02:48'),
(11, 'App\\Models\\User', 12, 'auth_token', '1449c16372977682d4da88fae630722cd9b40ac1e4b66413f4c9a0128eb8036e', '[\"pelanggan\"]', NULL, NULL, '2025-03-24 23:04:03', '2025-03-24 23:04:03'),
(12, 'App\\Models\\User', 12, 'auth_token', '77e1ddbceb795cbab25fe00b183a480d718ca8ec322eaf2e0f21a8252876188f', '[\"pelanggan\"]', NULL, NULL, '2025-03-24 23:05:32', '2025-03-24 23:05:32'),
(13, 'App\\Models\\User', 13, 'auth_token', '5f24887fe53d6c89571358624a0910de37b31b904740f671bc1b2e41cc150320', '[\"pelanggan\"]', '2025-03-25 02:00:44', NULL, '2025-03-24 23:13:51', '2025-03-25 02:00:44'),
(14, 'App\\Models\\User', 3, 'auth_token', '887a2ca7eb2ac83f6a452a04409828004df91e3726b19af96b752f19ad5a51a4', '[\"penjahit\"]', '2025-03-25 02:03:24', NULL, '2025-03-25 02:02:58', '2025-03-25 02:03:24'),
(15, 'App\\Models\\User', 3, 'auth_token', '1709e35fa00b423124756f38b540528966086b8cf37e906b9236a37919d82f01', '[\"penjahit\"]', '2025-03-25 23:57:03', NULL, '2025-03-25 02:05:53', '2025-03-25 23:57:03'),
(16, 'App\\Models\\User', 3, 'auth_token', 'ff32386ce195ed1b4bbacffa0104083bef1f93a872bf5c5e4bbb44a203653ca3', '[\"penjahit\"]', '2025-03-26 00:01:10', NULL, '2025-03-25 23:57:29', '2025-03-26 00:01:10'),
(17, 'App\\Models\\User', 3, 'auth_token', 'ac6e372d033bd6d6ce9cbcd6ee4947953ba1ad67f64c7b45e3c8491f5c856b01', '[\"penjahit\"]', '2025-03-26 00:05:58', NULL, '2025-03-26 00:01:20', '2025-03-26 00:05:58'),
(18, 'App\\Models\\User', 3, 'auth_token', '17484a3d3270863433fc2e1c8a4f79038737428ffefe5230c4525928d1319511', '[\"penjahit\"]', NULL, NULL, '2025-03-26 00:03:38', '2025-03-26 00:03:38');

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('WmfZwtW5bfN0GeCmG5JzMvHAc61wJfUulDECoDAL', NULL, '127.0.0.1', 'PostmanRuntime/7.43.2', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZ1QwNmpQZXJYV1VLTW9aZ3BNOEh3dFlGUzhvaWtWU1NwSWhUTkZzRSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1742872305);

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

--
-- Table structure for table `tailor_ratings`
--

CREATE TABLE `tailor_ratings` (
  `id` bigint UNSIGNED NOT NULL,
  `booking_id` bigint UNSIGNED NOT NULL,
  `customer_id` bigint UNSIGNED NOT NULL,
  `tailor_id` bigint UNSIGNED NOT NULL,
  `rating` decimal(2,1) NOT NULL,
  `review` text COLLATE utf8mb4_unicode_ci,
  `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 `tailor_ratings`
--

INSERT INTO `tailor_ratings` (`id`, `booking_id`, `customer_id`, `tailor_id`, `rating`, `review`, `created_at`, `updated_at`) VALUES
(1, 3, 7, 4, '4.5', 'Hasil jahitan sangat rapi dan sesuai ekspektasi', '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(2, 2, 6, 3, '4.0', 'Pelayanan bagus, hasil jahitan sesuai', '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(3, 1, 5, 2, '5.0', 'Sangat puas dengan hasil jahitan', '2025-03-24 14:15:15', '2025-03-24 14:15:15');

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

--
-- Table structure for table `tailor_services`
--

CREATE TABLE `tailor_services` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `category` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estimated_days` int NOT NULL DEFAULT '1',
  `is_available` tinyint(1) NOT NULL DEFAULT '1',
  `service_photo` varchar(255) COLLATE utf8mb4_unicode_ci 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 `tailor_services`
--

INSERT INTO `tailor_services` (`id`, `user_id`, `name`, `description`, `price`, `category`, `estimated_days`, `is_available`, `service_photo`, `created_at`, `updated_at`) VALUES
(1, 2, 'Jahit Baju Pesta', 'Jahit baju pesta dengan kualitas terbaik', '500000.00', 'Jahit Baru', 7, 1, 'services/baju_pesta.jpg', '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(2, 3, 'Jahit Baju Muslim', 'Jahit baju muslim dengan desain modern', '350000.00', 'Jahit Baru', 5, 1, 'services/baju_muslim.jpg', '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(3, 4, 'Perbaikan Baju', 'Perbaikan baju rusak atau tidak pas', '100000.00', 'Perbaikan', 3, 1, 'services/perbaikan.jpg', '2025-03-24 14:15:15', '2025-03-24 14:15:15');

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

--
-- Table structure for table `tailor_specializations`
--

CREATE TABLE `tailor_specializations` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `icon` varchar(255) COLLATE utf8mb4_unicode_ci 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 `tailor_specializations`
--

INSERT INTO `tailor_specializations` (`id`, `name`, `icon`, `created_at`, `updated_at`) VALUES
(1, 'Celana', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(2, 'Rok', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(3, 'Kemeja', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(4, 'Seragam', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(5, 'Jas Blazer', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(6, 'Kebaya', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(7, 'Gaun', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(8, 'Gamis', NULL, '2025-03-23 07:12:26', '2025-03-23 07:12:26'),
(9, 'Baju Pesta', 'dress', '2025-03-24 14:15:13', '2025-03-24 14:15:13'),
(10, 'Baju Muslim', 'hijab', '2025-03-24 14:15:13', '2025-03-24 14:15:13'),
(11, 'Baju Casual', 'tshirt', '2025-03-24 14:15:13', '2025-03-24 14:15:13'),
(12, 'Baju Batik', 'shirt', '2025-03-24 14:15:13', '2025-03-24 14:15:13'),
(13, 'Baju Anak', 'child', '2025-03-24 14:15:13', '2025-03-24 14:15:13');

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

--
-- Table structure for table `tailor_specialization_user`
--

CREATE TABLE `tailor_specialization_user` (
  `user_id` bigint UNSIGNED NOT NULL,
  `tailor_specialization_id` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tailor_specialization_user`
--

INSERT INTO `tailor_specialization_user` (`user_id`, `tailor_specialization_id`) VALUES
(8, 1),
(9, 1),
(10, 1),
(8, 2),
(9, 2),
(10, 2),
(2, 7),
(3, 8),
(3, 9),
(4, 11);

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

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

CREATE TABLE `users` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8mb4_unicode_ci,
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) DEFAULT NULL,
  `shop_description` text COLLATE utf8mb4_unicode_ci,
  `profile_photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci 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`, `email`, `password`, `role`, `phone_number`, `address`, `latitude`, `longitude`, `shop_description`, `profile_photo`, `email_verified_at`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin@example.com', '$2y$12$1xjXUN3sKlXGEGge4Tgz3uknp4lKoKE/6omrtKskVUk5Pjh79iVYq', 'admin', '081234567890', 'Jl. Admin No. 1', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:13', '2025-03-24 14:15:13'),
(2, 'Budi Santoso', 'budi@example.com', '$2y$12$yrfioUpS/pdazTGJIZu1j.OLoXeLH68cEch7lePoYXUUNv/nWPcv6', 'penjahit', '081234567891', 'Jl. Penjahit No. 1', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:14', '2025-03-24 14:15:14'),
(3, 'Siti Rahayu', 'siti@example.com', '$2y$12$Zb/eL4QPg.Vp9yDtrJgb4eo9Coi03lLoEAFG.Se2d6FoVi9ZfyrU6', 'penjahit', '081234567892', 'Jl. Penjahit No. 2', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:14', '2025-03-24 14:15:14'),
(4, 'Ahmad Hidayat', 'ahmad@example.com', '$2y$12$/FLgAmjxFq41y/Fmb9dT9uruuL.dTtLhSVxVNX/1yin4Jz6cQHsNG', 'penjahit', '081234567893', 'Jl. Penjahit No. 3', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:14', '2025-03-24 14:15:14'),
(5, 'Dewi Putri', 'dewi@example.com', '$2y$12$UgRRTBfZ9GfkpvfANSZEVOcQgIM00t20CjMtG6/FM3wD2/3eePnPi', 'pelanggan', '081234567894', 'Jl. Pelanggan No. 1', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(6, 'Rudi Hermawan', 'rudi@example.com', '$2y$12$guYUbd7s2shTsM5az8K7Le2sN92m4zoWY4VCTtOA38qHG6maQ2LXi', 'pelanggan', '081234567895', 'Jl. Pelanggan No. 2', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(7, 'Linda Wijaya', 'linda@example.com', '$2y$12$jiuezuHqqBkTxf3F15YC5OM/ZOSoo5CPij7IGzbtJExxQi22AZU9i', 'pelanggan', '081234567896', 'Jl. Pelanggan No. 3', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 14:15:15', '2025-03-24 14:15:15'),
(8, 'Nama Toko Jahit', 'tk_jahit@gmail.com', '$2y$12$aGordReKcgkMGdWvBowHouCKlUEAuw.7PELi8e7KDj.vyhgHPQh76', 'penjahit', '081234567890', 'Alamat lengkap toko', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 19:53:50', '2025-03-24 19:53:50'),
(9, 'Toko Jahit Makmur', 'jahit.makmur@example.com', '$2y$12$69Ppk63oK/J.zE7rbOUKL.AAtn9zbOwRyUdNxru4aKIvttqWLE.IK', 'penjahit', '081234567891', 'Jl. Menjahit Indah No. 123, Jakarta Selatan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 21:02:56', '2025-03-24 21:02:56'),
(10, 'Toko Jahit Suka', 'jahit.makmurr@example.com', '$2y$12$y7IySkko4ONipGqyz844L.ozq7u6xp546P5xVz0Js7bfTzlzLBdsO', 'penjahit', '081234567891', 'Jl. Menjahit Indah No. 123, Jakarta Selatan', NULL, NULL, 'Toko jahit terpercaya dengan pengalaman lebih dari 10 tahun. Menyediakan berbagai jasa jahit dan perbaikan pakaian dengan kualitas premium.', NULL, NULL, NULL, '2025-03-24 21:06:15', '2025-03-24 21:06:15'),
(11, 'Nama Pelanggan', 'pelanggan@example.com', '$2y$12$Dk4oUbw7/NRE1qvm87ykC.0ZxQHQXSSR.rgooSc31dif5VSV4ocg2', 'pelanggan', '081234567890', 'Alamat lengkap pelanggan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 23:02:48', '2025-03-24 23:02:48'),
(12, 'Nama Pelanggan', 'pelanggan2@gmail.com', '$2y$12$n9TeZXeYUZBNhwsHWOC.AueCRdzr06syVdcmjUnYsMSyhYeDI5esu', 'pelanggan', '081234567890', 'Alamat lengkap pelanggan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-03-24 23:04:03', '2025-03-24 23:04:03'),
(13, 'Pelanggan Baru', 'pelanggan.baru22@example.com', '$2y$12$vlH/SPHprFEYPxas23TBsOlJ0Ab53gr66Cs.eT45A69c7Dc2K2ISe', 'pelanggan', '081234567890', 'Jl. Pelanggan No. 123, Jakarta', '-6.1754000', '106.8272000', NULL, NULL, NULL, NULL, '2025-03-24 23:13:51', '2025-03-24 23:13:51');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bookings_customer_id_foreign` (`customer_id`),
  ADD KEY `bookings_tailor_id_foreign` (`tailor_id`);

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

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

--
-- Indexes for table `customer_specialization`
--
ALTER TABLE `customer_specialization`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `customer_specialization_user_id_tailor_specialization_id_unique` (`user_id`,`tailor_specialization_id`),
  ADD KEY `customer_specialization_tailor_specialization_id_foreign` (`tailor_specialization_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 `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

--
-- 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 `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `tailor_ratings`
--
ALTER TABLE `tailor_ratings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tailor_ratings_booking_id_customer_id_unique` (`booking_id`,`customer_id`),
  ADD KEY `tailor_ratings_customer_id_foreign` (`customer_id`),
  ADD KEY `tailor_ratings_tailor_id_foreign` (`tailor_id`);

--
-- Indexes for table `tailor_services`
--
ALTER TABLE `tailor_services`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tailor_services_user_id_foreign` (`user_id`);

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

--
-- Indexes for table `tailor_specialization_user`
--
ALTER TABLE `tailor_specialization_user`
  ADD PRIMARY KEY (`user_id`,`tailor_specialization_id`),
  ADD KEY `tailor_specialization_user_tailor_specialization_id_foreign` (`tailor_specialization_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `customer_specialization`
--
ALTER TABLE `customer_specialization`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `tailor_ratings`
--
ALTER TABLE `tailor_ratings`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tailor_services`
--
ALTER TABLE `tailor_services`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tailor_specializations`
--
ALTER TABLE `tailor_specializations`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bookings_tailor_id_foreign` FOREIGN KEY (`tailor_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_specialization`
--
ALTER TABLE `customer_specialization`
  ADD CONSTRAINT `customer_specialization_tailor_specialization_id_foreign` FOREIGN KEY (`tailor_specialization_id`) REFERENCES `tailor_specializations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `customer_specialization_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tailor_ratings`
--
ALTER TABLE `tailor_ratings`
  ADD CONSTRAINT `tailor_ratings_booking_id_foreign` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tailor_ratings_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tailor_ratings_tailor_id_foreign` FOREIGN KEY (`tailor_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

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

--
-- Constraints for table `tailor_specialization_user`
--
ALTER TABLE `tailor_specialization_user`
  ADD CONSTRAINT `tailor_specialization_user_tailor_specialization_id_foreign` FOREIGN KEY (`tailor_specialization_id`) REFERENCES `tailor_specializations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tailor_specialization_user_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 */;
