-- MySQL dump 10.19  Distrib 10.3.39-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: Gourmandise
-- ------------------------------------------------------
-- Server version	10.3.39-MariaDB-0+deb10u1

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `Client`
--

DROP TABLE IF EXISTS `Client`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Client` (
  `Id` int(11) NOT NULL,
  `NomCli` char(20) DEFAULT NULL,
  `PrenomCli` char(20) DEFAULT NULL,
  `AdresseCli` char(60) DEFAULT NULL,
  `Cpclli` char(5) DEFAULT NULL,
  `VilleCli` char(30) DEFAULT NULL,
  `TelephoneCli` char(14) DEFAULT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Client`
--

LOCK TABLES `Client` WRITE;
/*!40000 ALTER TABLE `Client` DISABLE KEYS */;
INSERT INTO `Client` VALUES (17,'TARTINAUX','Lucien','12 rue de la Justice','51100','Reims','03.26.25.48.87'),(47,'RABIN','Sandrine','21 rue de la méditerranée','51100','Reims','03.26.14.15.25'),(49,'COTOY','Sylvie','12 rue des écus','51100','Reims','03.26.10.25.75'),(58,'LEGROS','Christian','18 place des Oiseaux','51200','Fismes','03.26.44.55.66');
/*!40000 ALTER TABLE `Client` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Commande`
--

DROP TABLE IF EXISTS `Commande`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Commande` (
  `Id` int(11) NOT NULL,
  `DateCommande` date DEFAULT NULL,
  `TotalHT` int(11) DEFAULT NULL,
  `DateLivraison` date DEFAULT NULL,
  `IdVendeur` int(11) DEFAULT NULL,
  `IdClient` int(11) DEFAULT NULL,
  PRIMARY KEY (`Id`),
  KEY `c1` (`IdVendeur`),
  KEY `c2` (`IdClient`),
  CONSTRAINT `c1` FOREIGN KEY (`IdVendeur`) REFERENCES `Vendeur` (`Id`),
  CONSTRAINT `c2` FOREIGN KEY (`IdClient`) REFERENCES `Client` (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Commande`
--

LOCK TABLES `Commande` WRITE;
/*!40000 ALTER TABLE `Commande` DISABLE KEYS */;
INSERT INTO `Commande` VALUES (10178,'2021-09-05',177,'2021-09-05',15,17),(10184,'2021-10-22',399,'2021-10-22',15,58),(10186,'2021-10-12',101,'2021-10-14',17,58),(10190,'2021-10-11',126,'2021-10-13',15,49),(10759,'2021-11-15',212,'2021-11-16',17,17);
/*!40000 ALTER TABLE `Commande` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `LigneCommande`
--

DROP TABLE IF EXISTS `LigneCommande`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LigneCommande` (
  `IdCommande` int(11) NOT NULL,
  `IdProduit` int(11) NOT NULL,
  `QuantiteDemandee` int(11) DEFAULT NULL,
  PRIMARY KEY (`IdCommande`,`IdProduit`),
  KEY `c4` (`IdProduit`),
  CONSTRAINT `c3` FOREIGN KEY (`IdCommande`) REFERENCES `Commande` (`Id`),
  CONSTRAINT `c4` FOREIGN KEY (`IdProduit`) REFERENCES `Produit` (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `LigneCommande`
--

LOCK TABLES `LigneCommande` WRITE;
/*!40000 ALTER TABLE `LigneCommande` DISABLE KEYS */;
INSERT INTO `LigneCommande` VALUES (10178,4015,9),(10184,4013,22),(10186,3002,7),(10190,4015,6),(10759,4004,16);
/*!40000 ALTER TABLE `LigneCommande` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Produit`
--

DROP TABLE IF EXISTS `Produit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Produit` (
  `Id` int(11) NOT NULL,
  `Designation` char(30) DEFAULT NULL,
  `Quantite` int(11) DEFAULT NULL,
  `Descriptif` char(1) DEFAULT NULL,
  `PrixUnitHT` float DEFAULT NULL,
  `PoidsPiece` int(11) DEFAULT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Produit`
--

LOCK TABLES `Produit` WRITE;
/*!40000 ALTER TABLE `Produit` DISABLE KEYS */;
INSERT INTO `Produit` VALUES (3002,'CARRE PECTO',500,'G',29,0),(4004,'SUCETTE BOULE POP',25,'P',21,40),(4013,'CARAMBAR COLA',40,'P',18,15),(4015,'SOURIS REGLISSE',500,'G',24,0);
/*!40000 ALTER TABLE `Produit` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `Vendeur`
--

DROP TABLE IF EXISTS `Vendeur`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Vendeur` (
  `Id` int(11) NOT NULL,
  `NomV` char(20) DEFAULT NULL,
  `PrenomV` char(20) DEFAULT NULL,
  `AdresseV` char(60) DEFAULT NULL,
  `CpV` char(5) DEFAULT NULL,
  `VilleV` char(30) DEFAULT NULL,
  `TelephoneV` char(14) DEFAULT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `Vendeur`
--

LOCK TABLES `Vendeur` WRITE;
/*!40000 ALTER TABLE `Vendeur` DISABLE KEYS */;
INSERT INTO `Vendeur` VALUES (15,'FILLARD','Sylvain','77 rue de l\'Adriatique','51100','Reims','03.26.12.25.25'),(17,'BAUDOT','Marrc','16 rue de Reims','51000','Cholons en Champagne','03.26.10.58.59'),(18,'Ethan','Lucas','27 rue de Lescaut','62223','Saint-Laurant','07.82.51.40.39'),(19,'Lucas','Ethan','27 rue de Lescaut','62223','Saint-Laurant','07.82.51.40.39');
/*!40000 ALTER TABLE `Vendeur` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2025-02-25 15:11:40
