-- --------------------------------------------------------
-- Server OS:                    Linux
-- HeidiSQL Version:             11.0.0.5919
-- --------------------------------------------------------


-- Dumping structure for table l3chir_397443.articles
CREATE TABLE IF NOT EXISTS `articles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `matricule` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `information` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `options` text COLLATE utf8mb4_unicode_ci,
  `composition` text COLLATE utf8mb4_unicode_ci,
  `user_id` int(11) NOT NULL,
  `categorie_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `image_file` text COLLATE utf8mb4_unicode_ci,
  `ismenu` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `ecom_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.articles: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.categories
CREATE TABLE IF NOT EXISTS `categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `designation` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` text COLLATE utf8mb4_unicode_ci,
  `category_id` int(11) DEFAULT NULL,
  `Local_ID` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `image_file` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `isnotdisplayedoncaisse` tinyint(1) NOT NULL,
  `ecom_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.categories: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.clients
CREATE TABLE IF NOT EXISTS `clients` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `numclient` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` text COLLATE utf8mb4_unicode_ci,
  `user_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `clients_numclient_unique` (`numclient`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.clients: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.compositions
CREATE TABLE IF NOT EXISTS `compositions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_article` int(11) NOT NULL,
  `id_composant` int(11) NOT NULL,
  `nbre_choix` int(11) NOT NULL,
  `store_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `PrixVente` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.compositions: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.detail_ecommerce_orders
CREATE TABLE IF NOT EXISTS `detail_ecommerce_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ecom_order_id` int(11) NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `variation_id` int(11) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `sku` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(8,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.detail_ecommerce_orders: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.ecommerce_orders
CREATE TABLE IF NOT EXISTS `ecommerce_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ecom_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `order_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `currency` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_created` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_modified` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount_total` decimal(8,2) DEFAULT NULL,
  `shipping_total` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `customer_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_completed` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `isSynchronized` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.ecommerce_orders: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.ecommerce_order_addresses
CREATE TABLE IF NOT EXISTS `ecommerce_order_addresses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ecom_order_id` int(11) NOT NULL,
  `type` enum('billing','shipping') COLLATE utf8mb4_unicode_ci NOT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `company` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `postcode` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.ecommerce_order_addresses: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.jobs
CREATE TABLE IF NOT EXISTS `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci 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,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.jobs: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.migrations
CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.migrations: ~18 rows (approximately)
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
	(1, '2014_10_12_000000_create_users_table', 1),
	(2, '2014_10_12_100000_create_password_resets_table', 1),
	(3, '2019_01_23_152442_create_roles_table', 1),
	(4, '2019_01_23_154301_create_clients_table', 1),
	(5, '2019_01_23_155540_create_sortiestocks_table', 1),
	(6, '2019_01_23_162131_create_articles_table', 1),
	(7, '2019_01_23_162644_create_categories_table', 1),
	(8, '2019_01_24_084028_create_stores_table', 1),
	(9, '2019_01_24_084402_create_store_users_table', 1),
	(10, '2020_03_04_093307_create_jobs_table', 1),
	(11, '2020_03_21_144633_create_sellers_table', 1),
	(12, '2020_04_15_123627_create_compositions_table', 1),
	(13, '2020_05_11_101549_create_ecommerce_orders_table', 1),
	(14, '2020_05_11_102640_create_ecommerce_order_addresses_table', 1),
	(15, '2020_05_11_105622_create_detail_ecommerce_orders_table', 1),
	(16, '2020_05_11_171509_add_is_synchronized_to_ecommerce_orders_table', 1),
	(17, '2020_05_15_112616_add_ecom_id_to_categories_table', 1),
	(18, '2020_05_15_112741_add_ecom_id_to_articles_table', 1),
	(19, '2020_11_11_162102_add_unitary_price_to_compositions', 2);

-- Dumping structure for table l3chir_397443.roles
CREATE TABLE IF NOT EXISTS `roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.roles: ~1 rows (approximately)
INSERT INTO `roles` (`id`, `name`, `permission`, `created_at`, `updated_at`) VALUES
	(1, 'Admin', NULL, '2020-03-25 11:42:35', '2020-03-25 11:42:35');

-- Dumping structure for table l3chir_397443.sortiestocks
CREATE TABLE IF NOT EXISTS `sortiestocks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `numsortie` int(11) NOT NULL,
  `numdocument` int(11) DEFAULT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `montant` double DEFAULT NULL,
  `options` text COLLATE utf8mb4_unicode_ci,
  `details` text COLLATE utf8mb4_unicode_ci,
  `user_id` int(11) NOT NULL,
  `client_id` int(11) DEFAULT NULL,
  `store_id` int(11) NOT NULL,
  `date_` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.sortiestocks: ~0 rows (approximately)

-- Dumping structure for table l3chir_397443.store_users
CREATE TABLE IF NOT EXISTS `store_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `store_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table l3chir_397443.store_users: ~1 rows (approximately)
INSERT INTO `store_users` (`id`, `store_id`, `user_id`, `created_at`, `updated_at`) VALUES
	(1, 1, 1, '2020-03-25 11:42:35', '2020-03-25 11:42:35');


