-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : jeu. 01 jan. 2026 à 13:42
-- Version du serveur : 10.4.28-MariaDB
-- Version de PHP : 8.2.4

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 */;

--
-- Base de données : `imranei2021`
--

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

--
-- Structure de la table `lavandera_d1_cache`
--

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

--
-- Déchargement des données de la table `lavandera_d1_cache`
--

INSERT INTO `lavandera_d1_cache` (`key`, `value`, `expiration`) VALUES
('setting.currency', 's:2:\"Dh\";', 1764371462),
('setting.invoice_footer_text', 's:0:\"\";', 1764371462),
('setting.items_per_page', 'i:20;', 1764371462),
('setting.store_logo', 'N;', 1764371462),
('setting.store_name', 's:11:\"Gestock Pro\";', 1764371462);

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

--
-- Structure de la table `lavandera_d1_cache_locks`
--

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

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

--
-- Structure de la table `lavandera_d1_cashboxes`
--

CREATE TABLE `lavandera_d1_cashboxes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `starting_balance` decimal(12,2) NOT NULL DEFAULT 0.00,
  `current_balance` decimal(12,2) NOT NULL DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_cashboxes`
--

INSERT INTO `lavandera_d1_cashboxes` (`id`, `name`, `starting_balance`, `current_balance`, `notes`, `created_at`, `updated_at`) VALUES
(1, 'ِCaisse principale', 0.00, 0.00, NULL, '2025-11-26 06:09:35', '2026-01-01 09:53:32');

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

--
-- Structure de la table `lavandera_d1_cashbox_entries`
--

CREATE TABLE `lavandera_d1_cashbox_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cashbox_id` bigint(20) UNSIGNED NOT NULL,
  `financial_transaction_id` bigint(20) UNSIGNED DEFAULT NULL,
  `direction` enum('in','out') NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `running_balance` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `lavandera_d1_clothing_items`
--

CREATE TABLE `lavandera_d1_clothing_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `default_wash_price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `default_iron_price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_clothing_items`
--

INSERT INTO `lavandera_d1_clothing_items` (`id`, `name`, `slug`, `image_path`, `default_wash_price`, `default_iron_price`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'T-shirt', 'shirt', 'shirt_1764184039.jpg', 8.00, 5.00, 1, '2025-11-26 06:09:35', '2025-11-26 18:07:19'),
(2, 'Pantalon', 'pantalon', 'pantalon_1764183960.webp', 10.00, 6.00, 1, '2025-11-26 06:09:35', '2025-11-26 18:06:00'),
(4, 'Veste', 'veste', 'veste_1764224956.webp', 20.00, 12.00, 1, '2025-11-26 06:09:35', '2025-11-27 05:29:16'),
(5, 'Chemise', 'chemise', 'chemise_1764183704.webp', 18.00, 11.00, 1, '2025-11-26 06:09:35', '2025-11-26 18:01:44'),
(6, 'Costume', 'costume', 'costume_1764225068.jfif', 30.00, 15.00, 1, '2025-11-27 05:31:08', '2025-11-27 05:31:08'),
(7, 'جلابة', 'glab', 'glab_1764251546.png', 16.00, 8.00, 1, '2025-11-27 12:50:19', '2025-11-27 12:52:26'),
(8, 'قفطان', 'kftan', 'kftan_1764251605.jpg', 16.00, 8.00, 1, '2025-11-27 12:53:25', '2025-11-27 12:53:25');

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

--
-- Structure de la table `lavandera_d1_failed_jobs`
--

CREATE TABLE `lavandera_d1_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;

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

--
-- Structure de la table `lavandera_d1_financial_transactions`
--

CREATE TABLE `lavandera_d1_financial_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('income','expense') NOT NULL,
  `category` varchar(255) DEFAULT NULL,
  `reference_type` varchar(255) DEFAULT NULL,
  `reference_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cashbox_id` bigint(20) UNSIGNED DEFAULT NULL,
  `amount` decimal(12,2) NOT NULL,
  `description` text DEFAULT NULL,
  `occurred_on` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_financial_transactions`
--

INSERT INTO `lavandera_d1_financial_transactions` (`id`, `type`, `category`, `reference_type`, `reference_id`, `cashbox_id`, `amount`, `description`, `occurred_on`, `created_at`, `updated_at`) VALUES
(15, 'income', 'laundry-service', 'App\\Models\\ServiceOrder', 14, 1, 26.00, 'Payment received for order MSB-00001', '2025-11-27', '2025-11-27 19:01:11', '2025-11-27 19:01:11');

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

--
-- Structure de la table `lavandera_d1_jobs`
--

CREATE TABLE `lavandera_d1_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `lavandera_d1_job_batches`
--

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

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

--
-- Structure de la table `lavandera_d1_migrations`
--

CREATE TABLE `lavandera_d1_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;

--
-- Déchargement des données de la table `lavandera_d1_migrations`
--

INSERT INTO `lavandera_d1_migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2025_11_26_064131_create_clothing_items_table', 1),
(5, '2025_11_26_064200_create_cashboxes_table', 1),
(6, '2025_11_26_064209_create_service_orders_table', 1),
(7, '2025_11_26_064213_create_service_order_items_table', 1),
(8, '2025_11_26_064220_create_financial_transactions_table', 1),
(9, '2025_11_26_064230_create_cashbox_entries_table', 1),
(10, '2025_11_26_064236_create_settings_table', 1),
(11, '2025_11_26_151044_add_color_to_service_order_items_table', 2),
(12, '2025_11_26_184412_add_service_type_to_service_order_items_table', 3),
(13, '2025_11_27_161956_create_roles_table', 4),
(14, '2025_11_27_162000_create_permissions_table', 4),
(15, '2025_11_27_162004_create_role_permissions_table', 4),
(16, '2025_11_27_162008_add_role_id_to_users_table', 4),
(17, '2025_11_27_181929_update_service_orders_status_enum', 5);

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

--
-- Structure de la table `lavandera_d1_password_reset_tokens`
--

CREATE TABLE `lavandera_d1_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;

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

--
-- Structure de la table `lavandera_d1_permissions`
--

CREATE TABLE `lavandera_d1_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `group` 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;

--
-- Déchargement des données de la table `lavandera_d1_permissions`
--

INSERT INTO `lavandera_d1_permissions` (`id`, `name`, `display_name`, `description`, `group`, `created_at`, `updated_at`) VALUES
(1, 'manage_users', 'Manage Users', 'Create, edit, and delete users', 'users', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(2, 'view_users', 'View Users', 'View users list', 'users', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(3, 'manage_roles', 'Manage Roles', 'Create, edit, and delete roles', 'roles', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(4, 'view_roles', 'View Roles', 'View roles list', 'roles', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(5, 'manage_permissions', 'Manage Permissions', 'Create, edit, and delete permissions', 'roles', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(6, 'manage_items', 'Manage Items', 'Create, edit, and delete clothing items', 'items', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(7, 'view_items', 'View Items', 'View items list', 'items', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(8, 'manage_orders', 'Manage Orders', 'Create, edit, and delete service orders', 'orders', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(9, 'view_orders', 'View Orders', 'View orders list', 'orders', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(10, 'create_orders', 'Create Orders', 'Create new service orders', 'orders', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(11, 'manage_transactions', 'Manage Transactions', 'Create, edit, and delete financial transactions', 'transactions', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(12, 'view_transactions', 'View Transactions', 'View transactions list', 'transactions', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(13, 'manage_cashboxes', 'Manage Cashboxes', 'Create, edit, and delete cashboxes', 'cashboxes', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(14, 'view_cashboxes', 'View Cashboxes', 'View cashboxes list', 'cashboxes', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(15, 'manage_settings', 'Manage Settings', 'Update system settings', 'settings', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(16, 'view_settings', 'View Settings', 'View system settings', 'settings', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(17, 'view_dashboard', 'View Dashboard', 'Access admin dashboard', 'dashboard', '2025-11-27 15:30:38', '2025-11-27 15:30:38');

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

--
-- Structure de la table `lavandera_d1_roles`
--

CREATE TABLE `lavandera_d1_roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_roles`
--

INSERT INTO `lavandera_d1_roles` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', 'Full system access with all permissions', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(2, 'manager', 'Manager', 'Can manage orders, items, and transactions', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(3, 'cashier', 'Cashier', 'Can create orders and view basic information', '2025-11-27 15:30:38', '2025-11-27 15:30:38');

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

--
-- Structure de la table `lavandera_d1_role_permissions`
--

CREATE TABLE `lavandera_d1_role_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `role_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
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_role_permissions`
--

INSERT INTO `lavandera_d1_role_permissions` (`id`, `role_id`, `permission_id`, `created_at`, `updated_at`) VALUES
(1, 1, 10, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(2, 1, 13, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(3, 1, 6, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(4, 1, 8, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(5, 1, 5, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(6, 1, 3, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(7, 1, 15, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(8, 1, 11, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(9, 1, 1, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(10, 1, 14, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(11, 1, 17, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(12, 1, 7, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(13, 1, 9, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(14, 1, 4, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(15, 1, 16, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(16, 1, 12, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(17, 1, 2, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(18, 2, 10, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(19, 2, 13, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(20, 2, 6, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(21, 2, 8, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(22, 2, 11, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(23, 2, 14, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(24, 2, 17, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(25, 2, 7, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(26, 2, 9, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(27, 2, 16, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(28, 2, 12, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(29, 3, 10, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(30, 3, 14, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(31, 3, 17, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(32, 3, 7, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(33, 3, 9, '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(34, 2, 15, '2026-01-01 09:51:23', '2026-01-01 09:51:23');

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

--
-- Structure de la table `lavandera_d1_service_orders`
--

CREATE TABLE `lavandera_d1_service_orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_number` varchar(255) NOT NULL,
  `barcode` varchar(255) NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `gender` enum('male','female') NOT NULL,
  `service_type` enum('washing','ironing') NOT NULL,
  `subtotal` decimal(12,2) NOT NULL DEFAULT 0.00,
  `discount_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `status` enum('processing','ready','collected') NOT NULL DEFAULT 'processing',
  `payment_status` enum('unpaid','paid') NOT NULL DEFAULT 'unpaid',
  `cashbox_id` bigint(20) UNSIGNED DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `collected_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;

--
-- Déchargement des données de la table `lavandera_d1_service_orders`
--

INSERT INTO `lavandera_d1_service_orders` (`id`, `order_number`, `barcode`, `customer_name`, `gender`, `service_type`, `subtotal`, `discount_amount`, `total`, `status`, `payment_status`, `cashbox_id`, `notes`, `completed_at`, `collected_at`, `created_at`, `updated_at`) VALUES
(17, 'FAC-00001', 'FAC-00001', NULL, 'male', 'ironing', 15.00, 0.00, 15.00, 'processing', 'unpaid', 1, NULL, NULL, NULL, '2026-01-01 10:01:12', '2026-01-01 10:01:12');

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

--
-- Structure de la table `lavandera_d1_service_order_items`
--

CREATE TABLE `lavandera_d1_service_order_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `service_order_id` bigint(20) UNSIGNED NOT NULL,
  `clothing_item_id` bigint(20) UNSIGNED NOT NULL,
  `quantity` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `color` varchar(50) DEFAULT NULL,
  `service_type` enum('washing','ironing') DEFAULT NULL,
  `unit_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `line_total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_service_order_items`
--

INSERT INTO `lavandera_d1_service_order_items` (`id`, `service_order_id`, `clothing_item_id`, `quantity`, `color`, `service_type`, `unit_price`, `line_total`, `created_at`, `updated_at`) VALUES
(27, 17, 6, 1, 'orange', 'ironing', 15.00, 15.00, '2026-01-01 10:01:12', '2026-01-01 10:01:12');

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

--
-- Structure de la table `lavandera_d1_sessions`
--

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

--
-- Déchargement des données de la table `lavandera_d1_sessions`
--

INSERT INTO `lavandera_d1_sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('06Z987SA7bA3n4XLf1aKE51V84geCqpxPF87fmti', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiaGN5cEpYTUI5ZkpuemVkcDhjWlNveWUzWTVGTlpQbHhldGNMYmhsMiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDE6Imh0dHA6Ly9sYXZhbmRlcmEubG9jYWwvYWRtaW4vdHJhbnNhY3Rpb25zIjtzOjU6InJvdXRlIjtzOjI0OiJhZG1pbi50cmFuc2FjdGlvbnMuaW5kZXgiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjY6ImxvY2FsZSI7czoyOiJhciI7czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6Mjt9', 1767264814),
('DzipH2LA3QuwHRosNkIWraJCiSEz1j6BQromlT8R', 3, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoialp6T3ZPcXFXdFZHYUJ3ckZxbWM1Q1FCYXJ5UEFuQ1JaSEdBVklWQyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjI6Imh0dHA6Ly9sYXZhbmRlcmEubG9jYWwiO3M6NToicm91dGUiO3M6MjA6InNlcnZpY2Utb3JkZXJzLmluZGV4Ijt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MztzOjY6ImxvY2FsZSI7czoyOiJhciI7fQ==', 1767265274);

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

--
-- Structure de la table `lavandera_d1_settings`
--

CREATE TABLE `lavandera_d1_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `key` varchar(255) NOT NULL,
  `value` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `lavandera_d1_settings`
--

INSERT INTO `lavandera_d1_settings` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
(1, 'company_name', 'ImraneSoft', '2025-11-26 06:09:35', '2026-01-01 09:56:01'),
(2, 'barcode_prefix', 'FAC', '2025-11-26 06:09:35', '2026-01-01 09:51:27'),
(3, 'receipt_copies', '2', '2025-11-26 06:09:35', '2025-11-26 06:09:35'),
(4, 'currency', 'Dh', '2025-11-26 06:09:35', '2025-11-26 06:13:15'),
(5, 'company_address', 'Tiznit Maroc', '2025-11-26 06:13:15', '2026-01-01 09:59:45'),
(6, 'company_phone', '06.74.42.77.48', '2025-11-26 06:13:15', '2026-01-01 09:56:01'),
(7, 'order_prefix', 'FAC', '2025-11-26 06:13:15', '2026-01-01 09:55:31'),
(8, 'machine_id', 'e85a38f1bae05391c5514c1914ba8fea', '2025-11-27 20:53:16', '2025-11-27 20:53:16'),
(10, 'trial_start_date', '2025-12-30', '2025-12-30 13:59:39', '2025-12-30 13:59:39');

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

--
-- Structure de la table `lavandera_d1_users`
--

CREATE TABLE `lavandera_d1_users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `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;

--
-- Déchargement des données de la table `lavandera_d1_users`
--

INSERT INTO `lavandera_d1_users` (`id`, `role_id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(2, 1, 'Administrator', 'admin@lavandera.com', NULL, '$2y$12$zAOTt/HB8p0Pr6XRheomc.bBCyOdGDJ9Om..GWLV5crC4GHwUEz9m', 'kbDzNpueGInA4ILd2RdYkcygskG4rlM48VZ3tHd9IGuPFmXkdwvXyud0ywTu', '2025-11-27 15:30:38', '2025-11-27 15:30:38'),
(3, 2, 'Manager', 'manager@lavandera.com', NULL, '$2y$12$uXrhsTv46DFaf/O4QHCaAuBgRovDviyFplvUpxc.lpFRVSWghK3o2', NULL, '2025-11-27 16:02:29', '2026-01-01 09:48:16'),
(4, 3, 'Caissier', 'cashier@lavandera.com', NULL, '$2y$12$pRtcOUM.riW9DXDLURsIT.iJc15oDm13vG8EHu9mVWG2KAfPkHcc2', NULL, '2025-11-27 16:02:29', '2026-01-01 09:47:51');

--
-- Index pour les tables déchargées
--

--
-- Index pour la table `lavandera_d1_cache`
--
ALTER TABLE `lavandera_d1_cache`
  ADD PRIMARY KEY (`key`);

--
-- Index pour la table `lavandera_d1_cache_locks`
--
ALTER TABLE `lavandera_d1_cache_locks`
  ADD PRIMARY KEY (`key`);

--
-- Index pour la table `lavandera_d1_cashboxes`
--
ALTER TABLE `lavandera_d1_cashboxes`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `lavandera_d1_cashbox_entries`
--
ALTER TABLE `lavandera_d1_cashbox_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lavandera_d1_ce_cid_fk` (`cashbox_id`),
  ADD KEY `lavandera_d1_ce_ftid_fk` (`financial_transaction_id`);

--
-- Index pour la table `lavandera_d1_clothing_items`
--
ALTER TABLE `lavandera_d1_clothing_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_ci_slug_unq` (`slug`);

--
-- Index pour la table `lavandera_d1_failed_jobs`
--
ALTER TABLE `lavandera_d1_failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_fj_uuid_unq` (`uuid`);

--
-- Index pour la table `lavandera_d1_financial_transactions`
--
ALTER TABLE `lavandera_d1_financial_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lavandera_d1_ft_ref_idx` (`reference_type`,`reference_id`),
  ADD KEY `lavandera_d1_ft_cid_fk` (`cashbox_id`);

--
-- Index pour la table `lavandera_d1_jobs`
--
ALTER TABLE `lavandera_d1_jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lavandera_d1_jobs_q_idx` (`queue`);

--
-- Index pour la table `lavandera_d1_job_batches`
--
ALTER TABLE `lavandera_d1_job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `lavandera_d1_migrations`
--
ALTER TABLE `lavandera_d1_migrations`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `lavandera_d1_password_reset_tokens`
--
ALTER TABLE `lavandera_d1_password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Index pour la table `lavandera_d1_permissions`
--
ALTER TABLE `lavandera_d1_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_perm_name_unq` (`name`);

--
-- Index pour la table `lavandera_d1_roles`
--
ALTER TABLE `lavandera_d1_roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_role_name_unq` (`name`);

--
-- Index pour la table `lavandera_d1_role_permissions`
--
ALTER TABLE `lavandera_d1_role_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_rp_rpid_unq` (`role_id`,`permission_id`),
  ADD KEY `lavandera_d1_rp_pid_fk` (`permission_id`);

--
-- Index pour la table `lavandera_d1_service_orders`
--
ALTER TABLE `lavandera_d1_service_orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_so_onum_unq` (`order_number`),
  ADD UNIQUE KEY `lavandera_d1_so_bar_unq` (`barcode`),
  ADD KEY `lavandera_d1_so_cid_fk` (`cashbox_id`);

--
-- Index pour la table `lavandera_d1_service_order_items`
--
ALTER TABLE `lavandera_d1_service_order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lavandera_d1_soi_soid_fk` (`service_order_id`),
  ADD KEY `lavandera_d1_soi_ciid_fk` (`clothing_item_id`);

--
-- Index pour la table `lavandera_d1_sessions`
--
ALTER TABLE `lavandera_d1_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lavandera_d1_sess_uid_idx` (`user_id`),
  ADD KEY `lavandera_d1_sess_last_idx` (`last_activity`);

--
-- Index pour la table `lavandera_d1_settings`
--
ALTER TABLE `lavandera_d1_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_set_key_unq` (`key`);

--
-- Index pour la table `lavandera_d1_users`
--
ALTER TABLE `lavandera_d1_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lavandera_d1_usr_email_unq` (`email`),
  ADD KEY `lavandera_d1_usr_rid_fk` (`role_id`);

--
-- AUTO_INCREMENT pour les tables déchargées
--

--
-- AUTO_INCREMENT pour la table `lavandera_d1_cashboxes`
--
ALTER TABLE `lavandera_d1_cashboxes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_cashbox_entries`
--
ALTER TABLE `lavandera_d1_cashbox_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_clothing_items`
--
ALTER TABLE `lavandera_d1_clothing_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_failed_jobs`
--
ALTER TABLE `lavandera_d1_failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_financial_transactions`
--
ALTER TABLE `lavandera_d1_financial_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_jobs`
--
ALTER TABLE `lavandera_d1_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_migrations`
--
ALTER TABLE `lavandera_d1_migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_permissions`
--
ALTER TABLE `lavandera_d1_permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_roles`
--
ALTER TABLE `lavandera_d1_roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_role_permissions`
--
ALTER TABLE `lavandera_d1_role_permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_service_orders`
--
ALTER TABLE `lavandera_d1_service_orders`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_service_order_items`
--
ALTER TABLE `lavandera_d1_service_order_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_settings`
--
ALTER TABLE `lavandera_d1_settings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT pour la table `lavandera_d1_users`
--
ALTER TABLE `lavandera_d1_users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Contraintes pour les tables déchargées
--

--
-- Contraintes pour la table `lavandera_d1_cashbox_entries`
--
ALTER TABLE `lavandera_d1_cashbox_entries`
  ADD CONSTRAINT `lavandera_d1_ce_cid_fk` FOREIGN KEY (`cashbox_id`) REFERENCES `lavandera_d1_cashboxes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lavandera_d1_ce_ftid_fk` FOREIGN KEY (`financial_transaction_id`) REFERENCES `lavandera_d1_financial_transactions` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `lavandera_d1_financial_transactions`
--
ALTER TABLE `lavandera_d1_financial_transactions`
  ADD CONSTRAINT `lavandera_d1_ft_cid_fk` FOREIGN KEY (`cashbox_id`) REFERENCES `lavandera_d1_cashboxes` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `lavandera_d1_role_permissions`
--
ALTER TABLE `lavandera_d1_role_permissions`
  ADD CONSTRAINT `lavandera_d1_rp_pid_fk` FOREIGN KEY (`permission_id`) REFERENCES `lavandera_d1_permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lavandera_d1_rp_rid_fk` FOREIGN KEY (`role_id`) REFERENCES `lavandera_d1_roles` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `lavandera_d1_service_orders`
--
ALTER TABLE `lavandera_d1_service_orders`
  ADD CONSTRAINT `lavandera_d1_so_cid_fk` FOREIGN KEY (`cashbox_id`) REFERENCES `lavandera_d1_cashboxes` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `lavandera_d1_service_order_items`
--
ALTER TABLE `lavandera_d1_service_order_items`
  ADD CONSTRAINT `lavandera_d1_soi_ciid_fk` FOREIGN KEY (`clothing_item_id`) REFERENCES `lavandera_d1_clothing_items` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lavandera_d1_soi_soid_fk` FOREIGN KEY (`service_order_id`) REFERENCES `lavandera_d1_service_orders` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `lavandera_d1_users`
--
ALTER TABLE `lavandera_d1_users`
  ADD CONSTRAINT `lavandera_d1_usr_rid_fk` FOREIGN KEY (`role_id`) REFERENCES `lavandera_d1_roles` (`id`) ON DELETE SET NULL;
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 */;
