-- https://www.phpmyadmin.net/
--
-- Client :  127.0.0.1
-- Généré le :  Lun 15 Janvier 2018 à 11:38
-- Version du serveur :  5.7.14
-- Version de PHP :  5.6.25




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

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

--
-- Structure de la table `article`
--

CREATE TABLE `article` (
  `id` int(11) NOT NULL,
  `reference` varchar(100) NOT NULL,
  `referencemere` varchar(100) DEFAULT NULL,
  `fournisseur` varchar(100) NOT NULL,
  `constructeur` varchar(100) DEFAULT NULL,
  `prixunitaire` varchar(20) NOT NULL,
  `prixremise` varchar(20) NOT NULL,
  `valeurremisepourcentage` varchar(20) DEFAULT NULL,
  `disponibilitedelai` varchar(20) NOT NULL,
  `disponibiliteetat` varchar(20) NOT NULL,
  `publie` varchar(11) NOT NULL,
  `ean` varchar(100) NOT NULL,
  `isbn` varchar(100) NOT NULL,
  `gammeprincipale` varchar(100) NOT NULL,
  `nom` varchar(500) NOT NULL,
  `resume` text NOT NULL,
  `description` text NOT NULL,
  `marqueid` varchar(20) DEFAULT NULL,
  `marquenom` varchar(100) DEFAULT NULL,
  `stock` varchar(11) DEFAULT NULL,
  `stockadd` varchar(11) DEFAULT NULL,
  `stockalerte` varchar(20) NOT NULL,
  `stockindisponible` varchar(20) NOT NULL,
  `tva` varchar(20) NOT NULL,
  `tvaid` varchar(20) NOT NULL,
  `poids` varchar(20) NOT NULL,
  `visuel` varchar(500) DEFAULT NULL,
  `date` varchar(20) NOT NULL,
  `datemodification` varchar(20) DEFAULT NULL,
  `del` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Structure de la table `commande`
--

CREATE TABLE `commande` (
  `id` int(11) NOT NULL,
  `idcommande` varchar(100) NOT NULL,
  `etatlivraison` int(11) DEFAULT NULL,
  `etatexpeditor` tinyint(4) DEFAULT '0',
  `expeditormajdate` varchar(20) DEFAULT NULL,
  `datecommande` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `montants_devise` varchar(100) DEFAULT NULL,
  `montantsmontantnetapayer` varchar(100) DEFAULT NULL,
  `montants_montant_net_a_payer_tvaincluse` varchar(100) DEFAULT NULL,
  `montantsmontantsoustotal` varchar(100) DEFAULT NULL,
  `montants_montant_sous_total_tvaincluse` varchar(100) DEFAULT NULL,
  `montantsmontantport` varchar(20) DEFAULT NULL,
  `montants_montant_port_taux` varchar(100) DEFAULT NULL,
  `montants_montant_port_tvaincluse` varchar(100) DEFAULT NULL,
  `montants_ecotaxe` varchar(100) DEFAULT NULL,
  `montantsdetailtvatotal` varchar(100) DEFAULT NULL,
  `montantsdetailtvatva` varchar(20) DEFAULT NULL,
  `clientid` varchar(100) DEFAULT NULL,
  `client_typeclient` varchar(100) DEFAULT NULL,
  `client_forme_juridique` varchar(100) DEFAULT NULL,
  `client_code_ape` varchar(100) DEFAULT NULL,
  `client_siret` varchar(100) DEFAULT NULL,
  `client_date_create` varchar(100) DEFAULT NULL,
  `client_conditionsreglement_differe` varchar(100) DEFAULT NULL,
  `client_conditionsreglement_hors_taxes` varchar(100) DEFAULT NULL,
  `client_conditionsreglement_message` varchar(100) DEFAULT NULL,
  `clientadressefacturationemail` varchar(100) DEFAULT NULL,
  `client_adresse_facturation_societe` varchar(100) DEFAULT NULL,
  `clientadressefacturationnom` varchar(100) DEFAULT NULL,
  `clientadressefacturationprenom` varchar(100) DEFAULT NULL,
  `clientadressefacturationadresse1` varchar(100) DEFAULT NULL,
  `client_adresse_facturation_adresse2` varchar(100) DEFAULT NULL,
  `clientadressefacturationcodepostal` varchar(100) DEFAULT NULL,
  `clientadressefacturationville` varchar(100) DEFAULT NULL,
  `client_adresse_facturation_pays_id` varchar(100) DEFAULT NULL,
  `client_adresse_facturation_pays_iso` varchar(100) DEFAULT NULL,
  `clientadressefacturationpaysnom` varchar(100) DEFAULT NULL,
  `clientadressefacturationtelfixe` varchar(100) DEFAULT NULL,
  `clientadressefacturationtelmobile` varchar(100) DEFAULT NULL,
  `clientadressefacturationsexe` varchar(100) DEFAULT NULL,
  `clientadressefacturationfax` varchar(100) DEFAULT NULL,
  `clientadresselivraisonemail` varchar(100) DEFAULT NULL,
  `clientadresselivraisonsociete` varchar(100) DEFAULT NULL,
  `clientadresselivraisonnom` varchar(100) DEFAULT NULL,
  `clientadresselivraisonprenom` varchar(100) DEFAULT NULL,
  `clientadresselivraisonadresse` varchar(100) DEFAULT NULL,
  `client_adresse_livraison_adresse2` varchar(100) DEFAULT NULL,
  `clientadresselivraisoncodepostal` varchar(100) DEFAULT NULL,
  `clientadresselivraisonville` varchar(100) DEFAULT NULL,
  `client_adresse_livraison_pays_id` varchar(100) DEFAULT NULL,
  `client_adresse_livraison_pays_iso` varchar(100) DEFAULT NULL,
  `clientadresselivraisonpaysnom` varchar(100) DEFAULT NULL,
  `clientadresselivraisontelfixe` varchar(100) DEFAULT NULL,
  `clientadresselivraisontelmobile` varchar(100) DEFAULT NULL,
  `clientadresselivraisonsexe` varchar(100) DEFAULT NULL,
  `clientadresselivraisonfax` varchar(100) DEFAULT NULL,
  `language` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `statuscode` varchar(100) DEFAULT NULL,
  `status_date` varchar(100) DEFAULT NULL,
  `code_remise` varchar(100) DEFAULT NULL,
  `ipcommande` varchar(100) DEFAULT NULL,
  `reglement_mode_id` varchar(100) DEFAULT NULL,
  `reglement_mode_nom` varchar(100) DEFAULT NULL,
  `reglementsigle` varchar(100) DEFAULT NULL,
  `reglement_type` varchar(100) DEFAULT NULL,
  `reglement_status` varchar(100) DEFAULT NULL,
  `reglementstatuscode` varchar(100) DEFAULT NULL,
  `expedition_mode_id` varchar(100) DEFAULT NULL,
  `expeditionmodenom` varchar(100) DEFAULT NULL,
  `expeditionmodesigle` varchar(100) DEFAULT NULL,
  `expeditionmodecodepointrelais` varchar(20) DEFAULT NULL,
  `idpointrelais` varchar(20) DEFAULT NULL,
  `expedition_mode_type` varchar(100) DEFAULT NULL,
  `expedition_delai` varchar(100) DEFAULT NULL,
  `expedition_delai_type` varchar(100) DEFAULT NULL,
  `datemaj` varchar(20) DEFAULT NULL,
  `codetracking` varchar(20) DEFAULT NULL,
  `transporteurid` int(11) DEFAULT NULL,
  `transporteur` varchar(200) DEFAULT NULL,
  `codetrackingpartielle` varchar(20) DEFAULT NULL,
  `idtransporteurpartielle` int(11) DEFAULT NULL,
  `transporteurpartielle` varchar(50) DEFAULT NULL,
  `del` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `commande`
--

INSERT INTO `commande` (`id`, `idcommande`, `etatlivraison`, `etatexpeditor`, `expeditormajdate`, `datecommande`, `montants_devise`, `montantsmontantnetapayer`, `montants_montant_net_a_payer_tvaincluse`, `montantsmontantsoustotal`, `montants_montant_sous_total_tvaincluse`, `montantsmontantport`, `montants_montant_port_taux`, `montants_montant_port_tvaincluse`, `montants_ecotaxe`, `montantsdetailtvatotal`, `montantsdetailtvatva`, `clientid`, `client_typeclient`, `client_forme_juridique`, `client_code_ape`, `client_siret`, `client_date_create`, `client_conditionsreglement_differe`, `client_conditionsreglement_hors_taxes`, `client_conditionsreglement_message`, `clientadressefacturationemail`, `client_adresse_facturation_societe`, `clientadressefacturationnom`, `clientadressefacturationprenom`, `clientadressefacturationadresse1`, `client_adresse_facturation_adresse2`, `clientadressefacturationcodepostal`, `clientadressefacturationville`, `client_adresse_facturation_pays_id`, `client_adresse_facturation_pays_iso`, `clientadressefacturationpaysnom`, `clientadressefacturationtelfixe`, `clientadressefacturationtelmobile`, `clientadressefacturationsexe`, `clientadressefacturationfax`, `clientadresselivraisonemail`, `clientadresselivraisonsociete`, `clientadresselivraisonnom`, `clientadresselivraisonprenom`, `clientadresselivraisonadresse`, `client_adresse_livraison_adresse2`, `clientadresselivraisoncodepostal`, `clientadresselivraisonville`, `client_adresse_livraison_pays_id`, `client_adresse_livraison_pays_iso`, `clientadresselivraisonpaysnom`, `clientadresselivraisontelfixe`, `clientadresselivraisontelmobile`, `clientadresselivraisonsexe`, `clientadresselivraisonfax`, `language`, `status`, `statuscode`, `status_date`, `code_remise`, `ipcommande`, `reglement_mode_id`, `reglement_mode_nom`, `reglementsigle`, `reglement_type`, `reglement_status`, `reglementstatuscode`, `expedition_mode_id`, `expeditionmodenom`, `expeditionmodesigle`, `expeditionmodecodepointrelais`, `idpointrelais`, `expedition_mode_type`, `expedition_delai`, `expedition_delai_type`, `datemaj`, `codetracking`, `transporteurid`, `transporteur`, `codetrackingpartielle`, `idtransporteurpartielle`, `transporteurpartielle`, `del`) VALUES
(1, 'XKBKNABJK', 4, 1, NULL, '2017-12-27 13:04:51', NULL, '55.000000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'pub@prestashop.com', NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Livraison le lendemain !', 'COLI', NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL),
(2, 'OHSATSERP', 6, 1, NULL, '2017-12-27 13:04:54', NULL, '75.900000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'pub@prestashop.com', NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Livraison le lendemain !', '', NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL),
(3, 'UOYEVOLI', 3, NULL, NULL, '2017-12-19 19:10:58', NULL, '76.010000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'pub@prestashop.com', NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Livraison le lendemain !', NULL, NULL, NULL, NULL, NULL, NULL, '2017-12-27 13:02:50', NULL, NULL, NULL, '', NULL, '', NULL),
(4, 'FFATNOMMJ', 4, NULL, NULL, '2017-12-19 19:10:58', NULL, '89.890000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'pub@prestashop.com', NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Livraison le lendemain !', '', NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, '', NULL, '', NULL),
(5, 'KHWLILZLL', 8, NULL, NULL, '2017-12-19 19:10:58', NULL, '71.510000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'pub@prestashop.com', NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, 'DOE', 'John', '16, Main street 2nd floor', NULL, '33133', 'Miami', NULL, NULL, 'États-Unis', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'bankwire', NULL, NULL, '5', NULL, 'Livraison le lendemain !', '', NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL),
(6, 'XBAHTOYMQ', 5, NULL, NULL, '2017-12-26 22:48:28', NULL, '214.780000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'khadija.chahir@gmail.com', NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Retrait en magasin', '', NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, '', NULL, '', NULL),
(7, 'JJRYAUGWH', 2, NULL, NULL, '2017-12-27 00:06:54', NULL, '98.930000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'khadija.chahir@gmail.com', NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Retrait en magasin', 'Retrait en magasin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(8, 'ENPNABJQX', 2, NULL, NULL, '2017-12-27 13:01:38', NULL, '40.800000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'khadija.chahir@gmail.com', NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Livraison le lendemain !', 'Livraison le lendemain !', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(10, 'HSFDCMDYW', 1, NULL, NULL, '2017-12-27 14:08:46', NULL, '34.780000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'khadija.chahir@gmail.com', NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Retrait en magasin', 'Retrait en magasin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(11, 'DTYQASADQ', 1, NULL, NULL, '2017-12-27 14:13:09', NULL, '31.200000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'khadija.chahir@gmail.com', NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, 'chahir', 'Khadija', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Retrait en magasin', 'Retrait en magasin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(12, 'UEJNRITBI', 1, NULL, NULL, '2017-12-27 15:51:00', NULL, '121.840000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'fdfd@gg.fr', NULL, 'NomTest', 'Prenomtest', 'Adresse 111 Adresse 222', NULL, '47000', 'Agen', NULL, NULL, 'France', '0102030405', '', NULL, NULL, NULL, NULL, 'NomTest', 'Prenomtest', 'Adresse 111 Adresse 222', NULL, '47000', 'Agen', NULL, NULL, 'France', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'bankwire', NULL, NULL, '5', NULL, 'Retrait en magasin', 'Retrait en magasin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(13, 'GGNWDVBLN', 1, NULL, NULL, '2017-12-28 16:23:53', NULL, '31.200000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'fdfd@gg.fr', NULL, 'NomTest', 'Prenomtest', 'Adresse 111 Adresse 222', NULL, '47000', 'Agen', NULL, NULL, 'France', '0102030405', '', NULL, NULL, NULL, NULL, 'NomTest', 'Prenomtest', 'Adresse 111 Adresse 222', NULL, '47000', 'Agen', NULL, NULL, 'France', '0102030405', '', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'bankwire', NULL, NULL, '5', NULL, 'Retrait en magasin', 'Retrait en magasin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(14, 'QGQDUESJA', 6, NULL, NULL, '2018-01-11 11:32:58', NULL, '19.680000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'ktestbis@gmail.com', NULL, 'NTestBIS', 'PTestBIS', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, 'NTestBIS', 'PTestBIS', '11, Av AAAA BBBB ', NULL, '11000', 'Rabat', NULL, NULL, 'France', '09999999999999', '09999999999999999', NULL, NULL, NULL, NULL, '10', NULL, NULL, NULL, NULL, NULL, 'cheque', NULL, NULL, '5', NULL, 'Retrait en magasin', '', NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL);

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

--
-- Structure de la table `commentaire`
--

CREATE TABLE `commentaire` (
  `id` int(11) NOT NULL,
  `idcommande` varchar(20) NOT NULL,
  `priorite` int(4) NOT NULL DEFAULT '0',
  `type` int(4) NOT NULL DEFAULT '0',
  `iduser` varchar(20) NOT NULL,
  `roleuser` varchar(50) DEFAULT NULL,
  `nomuser` varchar(100) NOT NULL,
  `nomclient` varchar(50) DEFAULT NULL,
  `prenomclient` varchar(50) DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `commentaire` varchar(300) NOT NULL,
  `vu` tinyint(4) NOT NULL DEFAULT '0',
  `del` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `commentaire`
--

INSERT INTO `commentaire` (`id`, `idcommande`, `priorite`, `type`, `iduser`, `roleuser`, `nomuser`, `nomclient`, `prenomclient`, `created`, `commentaire`, `vu`, `del`) VALUES
(1, 'OHSATSERP', 0, 0, '1', 'superadmin', 'Khadija chahir', NULL, NULL, '2017-12-27 13:05:30', 'je test', 0, 0),
(2, 'KHWLILZLL', 1, 13, '1', 'superadmin', 'Khadija chahir', NULL, NULL, '2017-12-27 13:06:14', 'Rupture totale ....', 0, 0);

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

--
-- Structure de la table `historique`
--

CREATE TABLE `historique` (
  `id` int(11) NOT NULL,
  `idcommande` varchar(20) NOT NULL,
  `iduser` int(11) DEFAULT NULL,
  `nomuser` varchar(100) DEFAULT NULL,
  `etatavant` int(11) NOT NULL,
  `etatapres` int(11) NOT NULL,
  `transport` varchar(100) NOT NULL,
  `codetracking` varchar(100) NOT NULL,
  `transportpartielle` varchar(50) DEFAULT NULL,
  `codetrackingpartielle` varchar(50) DEFAULT NULL,
  `datemaj` varchar(20) NOT NULL,
  `typeliv` varchar(20) NOT NULL,
  `reference` varchar(20) DEFAULT NULL,
  `quantitecmd` int(11) NOT NULL DEFAULT '0',
  `quantiteliv` int(11) NOT NULL DEFAULT '0',
  `del` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `historique`
--

INSERT INTO `historique` (`id`, `idcommande`, `iduser`, `nomuser`, `etatavant`, `etatapres`, `transport`, `codetracking`, `transportpartielle`, `codetrackingpartielle`, `datemaj`, `typeliv`, `reference`, `quantitecmd`, `quantiteliv`, `del`) VALUES
(1, 'UOYEVOLI', 1, 'Khadija chahir', 1, 2, '', '', NULL, NULL, '2017-12-26 23:27:41', 'Impression bons', NULL, 0, 0, 0),
(2, 'XKBKNABJK', 1, 'Khadija chahir', 1, 4, 'COLI', '', NULL, NULL, '2017-12-27 13:01:25', 'Complète', NULL, 0, 0, 0),
(3, 'OHSATSERP', 1, 'Khadija chahir', 1, 6, '', '', NULL, NULL, '2017-12-27 13:02:28', 'Complète', NULL, 0, 0, 0),
(4, 'UOYEVOLI', 1, 'Khadija chahir', 1, 4, '', '', '', '', '2017-12-27 13:02:49', 'Partielle', 'demo_1', 1, 1, 0),
(5, 'UOYEVOLI', 1, 'Khadija chahir', 1, 4, '', '', '', '', '2017-12-27 13:02:50', 'Partielle', 'demo_2', 1, 1, 0),
(6, 'UOYEVOLI', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:02:50', 'Partielle', 'demo_6', 1, 0, 0),
(7, 'FFATNOMMJ', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:03:09', 'Partielle', 'demo_1', 1, 0, 0),
(8, 'FFATNOMMJ', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:03:09', 'Partielle', 'demo_3', 1, 0, 0),
(9, 'FFATNOMMJ', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:03:09', 'Partielle', 'demo_5', 1, 0, 0),
(10, 'FFATNOMMJ', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:03:09', 'Partielle', 'demo_7', 1, 0, 0),
(11, 'FFATNOMMJ', 1, 'Khadija chahir', 3, 4, '', '', NULL, NULL, '2017-12-27 13:03:19', 'Complète', NULL, 0, 0, 0),
(12, 'KHWLILZLL', 1, 'Khadija chahir', 1, 8, '', '', NULL, NULL, '2017-12-27 13:03:34', 'Complète', NULL, 0, 0, 0),
(13, 'XBAHTOYMQ', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:03:49', 'Partielle', 'demo_3', 1, 0, 0),
(14, 'XBAHTOYMQ', 1, 'Khadija chahir', 1, 3, '', '', '', '', '2017-12-27 13:03:49', 'Partielle', 'demo_4', 3, 0, 0),
(15, 'XBAHTOYMQ', 1, 'Khadija chahir', 3, 5, '', '', NULL, NULL, '2017-12-27 13:04:00', 'Complète', NULL, 0, 0, 0),
(16, 'ENPNABJQX', 1, 'Khadija chahir', 1, 2, '', '', NULL, NULL, '2017-12-27 13:04:09', 'Impression bons', NULL, 0, 0, 0),
(17, 'JJRYAUGWH', 1, 'Khadija chahir', 1, 2, '', '', NULL, NULL, '2017-12-27 13:04:09', 'Impression bons', NULL, 0, 0, 0),
(18, 'QGQDUESJA', 1, 'Khadija chahir', 1, 6, '', '', NULL, NULL, '2018-01-11 10:21:31', 'Complète', NULL, 0, 0, 0);

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

--
-- Structure de la table `historiquecommande`
--

CREATE TABLE `historiquecommande` (
  `id` int(11) NOT NULL,
  `idcommande` varchar(20) NOT NULL,
  `idlignecommande` varchar(20) NOT NULL,
  `iduser` int(11) DEFAULT NULL,
  `nomuser` varchar(100) DEFAULT NULL,
  `etat` int(11) NOT NULL,
  `reference` varchar(100) NOT NULL,
  `marque` varchar(400) NOT NULL,
  `titre` varchar(500) DEFAULT NULL,
  `quantitecmd` int(11) NOT NULL DEFAULT '0',
  `quantiteliv` int(11) NOT NULL DEFAULT '0',
  `quantiteretour` int(11) NOT NULL DEFAULT '0',
  `datemaj` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `del` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Structure de la table `incidentcommentaire`
--

CREATE TABLE `incidentcommentaire` (
  `id` int(11) NOT NULL,
  `idincident` varchar(20) NOT NULL,
  `iduser` varchar(20) NOT NULL,
  `roleuser` varchar(50) DEFAULT NULL,
  `nomuser` varchar(100) NOT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `commentaire` text NOT NULL,
  `del` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Structure de la table `incidents`
--

CREATE TABLE `incidents` (
  `id` int(11) NOT NULL,
  `idcommande` varchar(20) DEFAULT NULL,
  `etat` varchar(20) NOT NULL,
  `type` varchar(20) NOT NULL,
  `marque` varchar(100) NOT NULL,
  `iduser` varchar(20) NOT NULL,
  `nomuser` varchar(100) NOT NULL,
  `roleuser` varchar(100) NOT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated` timestamp NOT NULL,
  `message` varchar(300) NOT NULL,
  `del` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `incidents`
--

INSERT INTO `incidents` (`id`, `idcommande`, `etat`, `type`, `marque`, `iduser`, `nomuser`, `roleuser`, `created`, `updated`, `message`, `del`) VALUES
(1, 'aaaaaaa', '1', '7', 'Galowade TEST', '1', 'Khadija chahir', 'superadmin', '2017-12-27 13:07:18', '0000-00-00 00:00:00', '', 0);

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

--
-- Structure de la table `lignecommande`
--

CREATE TABLE `lignecommande` (
  `id` int(11) NOT NULL,
  `idcommande` varchar(20) NOT NULL,
  `idlignecommande` varchar(20) NOT NULL,
  `etat` int(11) DEFAULT '1',
  `refproduit` varchar(100) DEFAULT NULL,
  `marque` varchar(100) DEFAULT NULL,
  `produit_id` varchar(20) DEFAULT NULL,
  `produit_rel_principal_id` varchar(20) DEFAULT NULL,
  `quantite` varchar(10) DEFAULT NULL,
  `quantitelivree` int(11) DEFAULT '0',
  `qantitealivrer` int(11) DEFAULT '0',
  `qantiteretourne` int(11) DEFAULT NULL,
  `nom` varchar(500) DEFAULT NULL,
  `prix_unitaire` varchar(20) DEFAULT NULL,
  `prix_ligne` varchar(20) DEFAULT NULL,
  `tva` varchar(10) DEFAULT NULL,
  `tva_taux` varchar(10) DEFAULT NULL,
  `poids` varchar(10) DEFAULT NULL,
  `remise_type` varchar(10) DEFAULT NULL,
  `remise_valeur` varchar(20) DEFAULT NULL,
  `remise_description` varchar(100) DEFAULT NULL,
  `option_cmd` varchar(20) DEFAULT NULL,
  `datemaj` datetime DEFAULT NULL,
  `clientnom` varchar(20) DEFAULT NULL,
  `clientprenom` varchar(20) DEFAULT NULL,
  `clientemail` varchar(100) DEFAULT NULL,
  `datecommande` varchar(20) DEFAULT NULL,
  `del` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `lignecommande`
--

INSERT INTO `lignecommande` (`id`, `idcommande`, `idlignecommande`, `etat`, `refproduit`, `marque`, `produit_id`, `produit_rel_principal_id`, `quantite`, `quantitelivree`, `qantitealivrer`, `qantiteretourne`, `nom`, `prix_unitaire`, `prix_ligne`, `tva`, `tva_taux`, `poids`, `remise_type`, `remise_valeur`, `remise_description`, `option_cmd`, `datemaj`, `clientnom`, `clientprenom`, `clientemail`, `datecommande`, `del`) VALUES
(1, 'XKBKNABJK', '1', 4, 'demo_2', NULL, '2', NULL, '1', 1, NULL, NULL, 'Blouse - Color : White, Size : M', '26.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(2, 'XKBKNABJK', '2', 4, 'demo_3', NULL, '3', NULL, '1', 1, NULL, NULL, 'Printed Dress - Color : Orange, Size : S', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(3, 'OHSATSERP', '3', 6, 'demo_2', NULL, NULL, NULL, '1', NULL, NULL, 1, 'Blouse - Color : White, Size : M', '26.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(4, 'OHSATSERP', '4', NULL, 'demo_6', NULL, NULL, NULL, '1', NULL, NULL, 0, 'Printed Summer Dress - Color : Yellow, Size : M', '30.502569', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5, 'OHSATSERP', '5', NULL, 'demo_7', NULL, NULL, NULL, '1', NULL, NULL, 0, 'Printed Chiffon Dress - Color : Yellow, Size : S', '20.501236', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(6, 'UOYEVOLI', '6', 4, 'demo_1', NULL, NULL, NULL, '1', 1, NULL, NULL, 'Faded Short Sleeve T-shirts - Color : Orange, Size : S', '16.510000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(7, 'UOYEVOLI', '7', 4, 'demo_2', NULL, NULL, NULL, '1', 1, NULL, NULL, 'Blouse - Color : White, Size : M', '26.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(8, 'UOYEVOLI', '8', 3, 'demo_6', NULL, NULL, NULL, '1', 0, NULL, NULL, 'Printed Summer Dress - Color : Yellow, Size : M', '30.502569', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(9, 'FFATNOMMJ', '9', 3, 'demo_1', NULL, NULL, NULL, '1', 0, NULL, NULL, 'Faded Short Sleeve T-shirts - Color : Orange, Size : S', '16.510000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(10, 'FFATNOMMJ', '10', 3, 'demo_3', NULL, NULL, NULL, '1', 0, NULL, NULL, 'Printed Dress - Color : Orange, Size : S', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(11, 'FFATNOMMJ', '11', 3, 'demo_5', NULL, NULL, NULL, '1', 0, NULL, NULL, 'Printed Summer Dress - Color : Yellow, Size : S', '30.506321', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(12, 'FFATNOMMJ', '12', 3, 'demo_7', NULL, NULL, NULL, '1', 0, NULL, NULL, 'Printed Chiffon Dress - Color : Yellow, Size : S', '20.501236', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(13, 'KHWLILZLL', '13', NULL, 'demo_1', NULL, '1', NULL, '1', NULL, NULL, NULL, 'Faded Short Sleeve T-shirts - Color : Orange, Size : S', '16.510000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(14, 'KHWLILZLL', '14', NULL, 'demo_2', NULL, '2', NULL, '1', NULL, NULL, NULL, 'Blouse - Color : Black, Size : S', '26.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(15, 'KHWLILZLL', '15', NULL, 'demo_3', NULL, '3', NULL, '1', NULL, NULL, NULL, 'Printed Dress - Color : Orange, Size : S', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(16, 'XBAHTOYMQ', '16', 3, 'demo_3', NULL, NULL, NULL, '1', 0, NULL, NULL, 'Robe imprimée - Taille : S, Couleur : Orange', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(17, 'XBAHTOYMQ', '17', 3, 'demo_4', NULL, NULL, NULL, '3', 0, NULL, NULL, 'Robe imprimée - Taille : S, Couleur : Beige', '50.994153', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(18, 'JJRYAUGWH', '18', NULL, 'demo_1', NULL, '1', NULL, '4', NULL, NULL, NULL, 'T-shirt délavé à manches courtes - Taille : L, Couleur : Orange', '16.510000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(19, 'JJRYAUGWH', '19', NULL, 'demo_7', NULL, '7', NULL, '1', NULL, NULL, NULL, 'Robe en mousseline imprimée - Taille : S, Couleur : Jaune', '20.501236', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(20, 'ENPNABJQX', '20', NULL, 'demo_2', NULL, '2', NULL, '1', NULL, NULL, NULL, 'Chemisier - Taille : S, Couleur : Noir', '26.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(21, 'HSFDCMDYW', '21', NULL, 'demo_5', NULL, '5', NULL, '1', NULL, NULL, NULL, 'Robe d\'été imprimée - Taille : S, Couleur : Jaune', '30.506321', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(22, 'DTYQASADQ', '22', NULL, 'demo_3', NULL, '3', NULL, '1', NULL, NULL, NULL, 'Robe imprimée - Taille : S, Couleur : Orange', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(23, 'UEJNRITBI', '23', NULL, 'demo_1', NULL, '1', NULL, '3', NULL, NULL, NULL, 'T-shirt délavé à manches courtes - Taille : S, Couleur : Bleu', '16.510000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(24, 'UEJNRITBI', '24', NULL, 'demo_3', NULL, '3', NULL, '2', NULL, NULL, NULL, 'Robe imprimée - Taille : S, Couleur : Orange', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(25, 'GGNWDVBLN', '25', NULL, 'demo_3', NULL, '3', NULL, '1', NULL, NULL, NULL, 'Robe imprimée - Taille : S, Couleur : Orange', '25.999852', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(26, 'QGQDUESJA', '26', 6, 'demo_7', NULL, NULL, NULL, '1', NULL, NULL, 1, 'Robe en mousseline imprimée - Taille : S, Couleur : Vert', '20.501236', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

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

--
-- Structure de la table `services`
--

CREATE TABLE `services` (
  `id` int(11) NOT NULL,
  `statut` tinyint(4) NOT NULL,
  `nom` varchar(100) NOT NULL,
  `sigle` varchar(100) NOT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `services`
--

INSERT INTO `services` (`id`, `statut`, `nom`, `sigle`, `created`) VALUES
(1, 1, 'Prestashop', 'PS', '2017-12-20 15:16:21'),
(2, 0, 'PowerBoutique', 'PWB', '2017-12-21 10:12:17');

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

--
-- Structure de la table `services_attributs`
--

CREATE TABLE `services_attributs` (
  `id` int(11) NOT NULL,
  `cle` varchar(100) NOT NULL,
  `value` varchar(500) DEFAULT NULL,
  `type` varchar(100) NOT NULL,
  `libelle` varchar(100) NOT NULL,
  `required` tinyint(4) NOT NULL,
  `servicesigle` varchar(100) NOT NULL,
  `serviceid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



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

--
-- Structure de la table `services_configs`
--

CREATE TABLE `services_configs` (
  `id` int(11) NOT NULL,
  `serviceid` int(11) NOT NULL,
  `servicesigle` varchar(50) NOT NULL,
  `attribut` varchar(100) NOT NULL,
  `value` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



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

--
-- Structure de la table `transporteur`
--

CREATE TABLE `transporteur` (
  `id` int(11) NOT NULL,
  `nom` varchar(100) NOT NULL,
  `sigle` varchar(20) NOT NULL,
  `url` varchar(500) NOT NULL,
  `etat` varchar(2) NOT NULL,
  `idtransportpwb` int(11) DEFAULT NULL,
  `del` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Contenu de la table `transporteur`
--

INSERT INTO `transporteur` (`id`, `nom`, `sigle`, `url`, `etat`, `idtransportpwb`, `del`) VALUES
(3, 'Colissimo Suivi', 'COLI', 'url', '1', 103, 0),
(5, 'Retrait(s) en magasin', 'MAG', '#', '1', 0, 0),
(6, 'Chronopost', 'CHRO', '#', '1', 3, 0);

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

--
-- Structure de la table `user_role`
--

CREATE TABLE `user_role` (
  `id` int(11) NOT NULL,
  `nom` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `role_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_default` tinyint(1) DEFAULT '0',
  `rights` text COLLATE utf8_unicode_ci,
  `parent` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Contenu de la table `user_role`
--

INSERT INTO `user_role` (`id`, `nom`, `role_id`, `is_default`, `rights`, `parent`, `created`) VALUES
(1, 'superadmin', 'superadmin', 1, NULL, NULL, '2017-06-01 13:19:09'),
(2, 'admin', 'admin', 0, NULL, NULL, '2017-06-01 13:19:09'),
(3, 'livraison', 'livraison', 0, NULL, NULL, '2017-06-01 13:19:09'),
(4, 'assistante', 'assistante', 0, NULL, NULL, '2017-06-01 13:19:09'),
(5, 'guest', 'guest', 0, NULL, NULL, '2017-12-26 14:36:53');

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

--
-- Structure de la table `user_role_linker`
--

CREATE TABLE `user_role_linker` (
  `user_id` int(11) UNSIGNED NOT NULL,
  `role_id` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Contenu de la table `user_role_linker`
--

INSERT INTO `user_role_linker` (`user_id`, `role_id`) VALUES
(2, 'admin'),
(6, 'assistante'),
(11, 'assistante'),
(4, 'livraison'),
(1, 'superadmin'),
(7, 'superadmin'),
(9, 'superadmin');

--
-- Index pour les tables exportées
--

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Index pour la table `user_role`
--
ALTER TABLE `user_role`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_role` (`role_id`),
  ADD KEY `idx_parent_id` (`parent`);

--
-- Index pour la table `user_role_linker`
--
ALTER TABLE `user_role_linker`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `role_id` (`role_id`);

--
-- AUTO_INCREMENT pour les tables exportées
--

--
-- AUTO_INCREMENT pour la table `article`
--
ALTER TABLE `article`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pour la table `commande`
--
ALTER TABLE `commande`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT pour la table `commentaire`
--
ALTER TABLE `commentaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT pour la table `historique`
--
ALTER TABLE `historique`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT pour la table `historiquecommande`
--
ALTER TABLE `historiquecommande`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pour la table `incidentcommentaire`
--
ALTER TABLE `incidentcommentaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pour la table `incidents`
--
ALTER TABLE `incidents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pour la table `lignecommande`
--
ALTER TABLE `lignecommande`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT pour la table `services`
--
ALTER TABLE `services`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT pour la table `services_attributs`
--
ALTER TABLE `services_attributs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT pour la table `services_configs`
--
ALTER TABLE `services_configs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT pour la table `transporteur`
--
ALTER TABLE `transporteur`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT pour la table `user_role`
--
ALTER TABLE `user_role`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Contraintes pour les tables exportées
--

--
-- Contraintes pour la table `user_role`
--
ALTER TABLE `user_role`
  ADD CONSTRAINT `fk_parent_id` FOREIGN KEY (`parent`) REFERENCES `user_role` (`role_id`) ON DELETE SET NULL;

