-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Client :  127.0.0.1
-- Généré le :  Sam 02 Avril 2016 à 22:20
-- Version du serveur :  5.6.17
-- Version de PHP :  5.5.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;

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

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

--
-- Structure de la table `comptes`
--

CREATE TABLE IF NOT EXISTS `comptes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dateCreation` date DEFAULT NULL,
  `dateModification` date DEFAULT NULL,
  `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `prenom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `adresse` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ville` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cp` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dateEmbauche` date DEFAULT NULL,
  `login` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `mdp` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `username_canonical` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email_canonical` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `enabled` tinyint(1) DEFAULT NULL,
  `salt` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_login` datetime DEFAULT NULL,
  `locked` tinyint(1) DEFAULT NULL,
  `expired` tinyint(1) DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL,
  `confirmation_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `password_requested_at` datetime DEFAULT NULL,
  `roles` longtext COLLATE utf8_unicode_ci COMMENT '(DC2Type:array)',
  `credentials_expired` tinyint(1) DEFAULT NULL,
  `credentials_expire_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_5673580192FC23A8` (`username_canonical`),
  UNIQUE KEY `UNIQ_56735801A0D96FBF` (`email_canonical`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=15 ;

--
-- Contenu de la table `comptes`
--

INSERT INTO `comptes` (`id`, `dateCreation`, `dateModification`, `nom`, `prenom`, `adresse`, `ville`, `cp`, `dateEmbauche`, `login`, `mdp`, `type`, `username`, `username_canonical`, `email`, `email_canonical`, `enabled`, `salt`, `password`, `last_login`, `locked`, `expired`, `expires_at`, `confirmation_token`, `password_requested_at`, `roles`, `credentials_expired`, `credentials_expire_at`) VALUES
(1, '2016-01-10', '2016-01-10', 'Trembleau', 'Raphael', 'Lyon', 'Lyon', '69000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(2, '2016-01-11', '2016-01-11', 'jackson', 'Jess', 'Lyon', 'Lyon', '69005', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'test', 'test', 'test@gmail.com', 'test@gmail.com', 1, '17gg95p8i3r48wc0soosooskc84sw0s', '$2y$13$17gg95p8i3r48wc0soosoeSQiA8Jd8EuJtPbKkf2IWrrTa.Zj1BWS', '2016-02-17 14:45:41', 0, 0, NULL, NULL, NULL, 'a:0:{}', 0, NULL),
(5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'test1', 'test1', 'test1@gmail.com', 'test1@gmail.com', 1, 'mlduta3yaw0gww8o8g0kw8scw0ow8g0', '$2y$13$mlduta3yaw0gww8o8g0kwuuITtDZck9ieTmlwFQ5LyRGahKhMc20e', '2016-02-10 11:55:28', 0, 0, NULL, NULL, NULL, 'a:0:{}', 0, NULL),
(6, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'compatbletest', 'compatbletest', 'comptabletest@gmail.com', 'comptabletest@gmail.com', 1, '7o86zeg8o78ko8g8ckk0ososcks8s4w', '$2y$13$7o86zeg8o78ko8g8ckk0oeEtzWaiDs3MpL6mQ8k8Ho0q5ewr9/yha', '2016-02-10 14:24:41', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:9:"COMPTABLE";}', 0, NULL),
(7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'michelle', 'michelle', 'michelle@gmail.com', 'michelle@gmail.com', 1, 'omm3p8tigkgk40k04gos8w4owogo0sw', '$2y$13$omm3p8tigkgk40k04gos8uqCFzV6SPuZTIov8nnBD2W4x3O3mutAy', '2016-02-10 16:43:42', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:8:"VISITEUR";}', 0, NULL),
(8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'comptableTest', 'comptabletest', 'test@comptable.com', 'test@comptable.com', 1, '544raa77keg4kkw8wss8wk4w8kgocow', '$2y$13$544raa77keg4kkw8wss8wewlXFy6kiulPI1u3MNn7NfQl.40rdLpy', '2016-02-18 16:21:30', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:14:"ROLE_COMPTABLE";}', 0, NULL),
(10, NULL, NULL, 'Administrateur', 'Administrateur', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', 'admin', 'admin@admin.com', 'admin@admin.com', 1, 'hbm4jxhqxi8kko8sowkw84k44w48wgs', '$2y$13$hbm4jxhqxi8kko8sowkw8ub2BDoRITR9ZWrJ3epxmwtjsMVPWvt8u', '2016-04-02 22:06:08', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:10:"ROLE_ADMIN";}', 0, NULL),
(11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'visiteur', 'visiteur', 'visiteur@visiteur.com', 'visiteur@visiteur.com', 1, 'poflno6mj6ogcsook440cwcgoc4ck44', '$2y$13$poflno6mj6ogcsook440curGc.MqXw1ykaMWQKA8yeU.VS3siQIWW', '2016-02-18 15:10:37', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:13:"ROLE_VISITEUR";}', 0, NULL),
(12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'visiteur1', 'visiteur1', 'visiteurs@gmail.com', 'visiteurs@gmail.com', 1, '4lccbxo8v4isswsk0gcs8wgcwok8kw0', '$2y$13$4lccbxo8v4isswsk0gcs8uH1CjIINw4BJE3casvD4K9WSflPjHCRO', '2016-02-18 12:40:17', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:13:"ROLE_VISITEUR";}', 0, NULL),
(13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'visiteur2', 'visiteur2', 'visiteur2@gmail.com', 'visiteur2@gmail.com', 1, 'imp6f6gonkoc0800ckcw8k0kwk4os4g', '$2y$13$imp6f6gonkoc0800ckcw8ecHc/AIxQSLiGVJw7wYcfs9XCX8CvKRW', '2016-02-18 12:40:51', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:13:"ROLE_VISITEUR";}', 0, NULL),
(14, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'comptable', 'comptable', 'comptable@gmail.com', 'comptable@gmail.com', 1, 'lwccorr1ilckoogo08soowsc0k8w88o', '$2y$13$lwccorr1ilckoogo08soouYLrugc2B3GBydJqT94mVY1dGWUdKfLu', '2016-04-02 11:25:40', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:14:"ROLE_COMPTABLE";}', 0, NULL);

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

--
-- Structure de la table `etat`
--

CREATE TABLE IF NOT EXISTS `etat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `dateCreation` date NOT NULL,
  `dateMotidification` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;

--
-- Contenu de la table `etat`
--

INSERT INTO `etat` (`id`, `libelle`, `dateCreation`, `dateMotidification`) VALUES
(1, 'En attente', '2015-11-27', '2015-11-27'),
(2, 'Valider', '0000-00-00', '0000-00-00'),
(3, 'Refuser', '0000-00-00', '0000-00-00'),
(4, 'Cloturer', '0000-00-00', '0000-00-00');

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

--
-- Structure de la table `fichefrais`
--

CREATE TABLE IF NOT EXISTS `fichefrais` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idetat` int(11) DEFAULT NULL,
  `compte_id` int(11) DEFAULT NULL,
  `mois` int(11) DEFAULT NULL,
  `annee` int(4) DEFAULT NULL,
  `nbJustificatifs` int(11) DEFAULT NULL,
  `montantValide` int(11) DEFAULT NULL,
  `dateMotidification` date DEFAULT NULL,
  `dateCreation` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_92D5AB08860506C2` (`idetat`),
  KEY `IDX_92D5AB08F2C56620` (`compte_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;

--
-- Contenu de la table `fichefrais`
--

INSERT INTO `fichefrais` (`id`, `idetat`, `compte_id`, `mois`, `annee`, `nbJustificatifs`, `montantValide`, `dateMotidification`, `dateCreation`) VALUES
(1, 1, 1, 1, 2016, 1, 1, '2015-12-02', '2015-12-10'),
(4, 4, 11, 3, 2016, 0, 0, '2016-04-02', NULL),
(5, 4, 12, 3, 2016, 0, 0, '2016-04-02', NULL),
(6, 4, 13, 3, 2016, 0, 0, '2016-04-02', NULL),
(7, 4, 10, 3, 2016, 0, 0, '2016-04-02', NULL),
(8, 4, 10, 3, 2016, 0, 0, '2016-04-02', NULL),
(9, 1, 10, 4, 2016, 0, 0, '2016-04-02', '2016-03-11');

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

--
-- Structure de la table `fraisforfait`
--

CREATE TABLE IF NOT EXISTS `fraisforfait` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idetat` int(11) DEFAULT NULL,
  `libelle` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `montant` double NOT NULL,
  `dateCreation` date NOT NULL,
  `dateModification` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idetat` (`idetat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `lignefraisforfait`
--

CREATE TABLE IF NOT EXISTS `lignefraisforfait` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idetat` int(11) DEFAULT NULL,
  `date` date NOT NULL,
  `quantiterepasmidi` int(11) NOT NULL,
  `dateCreation` date NOT NULL,
  `dateModification` date NOT NULL,
  `idFraisForfait` int(11) DEFAULT NULL,
  `idFicheFrais` int(11) DEFAULT NULL,
  `quantiterelaisetape` int(11) NOT NULL,
  `quantitenuitee` int(11) NOT NULL,
  `distance` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idetat` (`idetat`),
  KEY `idFraisForfait` (`idFraisForfait`),
  KEY `idComptes` (`idFicheFrais`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=36 ;

--
-- Contenu de la table `lignefraisforfait`
--

INSERT INTO `lignefraisforfait` (`id`, `idetat`, `date`, `quantiterepasmidi`, `dateCreation`, `dateModification`, `idFraisForfait`, `idFicheFrais`, `quantiterelaisetape`, `quantitenuitee`, `distance`) VALUES
(6, 2, '2015-12-22', 4, '2015-12-22', '2015-12-22', NULL, NULL, 2, 2, 2),
(7, 2, '2015-12-29', 5, '2015-12-29', '2015-12-29', NULL, NULL, 5, 5, 5),
(8, 2, '2015-12-29', 757, '2015-12-29', '2015-12-29', NULL, 1, 57, 75, 6),
(9, 1, '2015-12-29', 97, '2015-12-29', '2015-12-29', NULL, 1, 79, 4, 6),
(14, 1, '2016-02-18', 5, '2016-02-18', '2016-02-18', NULL, 4, 5, 5, 5),
(15, 1, '2016-02-18', 10, '2016-02-18', '2016-02-18', NULL, 4, 10, 10, 10),
(16, 1, '2016-02-18', 1, '2016-02-18', '2016-02-18', NULL, 5, 1, 1, 1),
(17, 1, '2016-02-18', 15, '2016-02-18', '2016-02-18', NULL, 6, 15, 15, 15),
(26, 2, '2016-02-22', 99, '2016-02-22', '2016-02-22', NULL, 7, 99, 99, 99),
(27, 1, '2016-02-22', 5, '2016-02-22', '2016-02-22', NULL, 7, 5, 5, 5),
(28, 1, '2016-02-22', 55, '2016-02-22', '2016-02-22', NULL, 7, 55, 55, 55),
(29, 1, '2016-02-27', 55, '2016-02-27', '2016-02-27', NULL, 7, 55, 55, 55),
(30, 1, '2016-03-05', 4, '2016-03-05', '2016-03-05', NULL, 7, 4, 4, 4),
(31, 2, '2016-03-11', 44, '2016-03-11', '2016-03-11', NULL, 9, 45, 45, 45),
(32, 1, '2016-03-19', 5, '2016-03-19', '2016-03-19', NULL, 9, 5, 5, 5),
(33, 1, '2016-03-19', 5, '2016-03-19', '2016-03-19', NULL, 9, 5, 5, 5),
(34, 1, '2016-03-19', 10, '2016-03-19', '2016-03-19', NULL, 9, 10, 10, 1),
(35, 1, '2016-04-02', 14, '2016-04-02', '2016-04-02', NULL, 9, 14, 14, 44);

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

--
-- Structure de la table `lignefraishorsfrais`
--

CREATE TABLE IF NOT EXISTS `lignefraishorsfrais` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idetat` int(11) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `montant` double NOT NULL,
  `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `dateCreation` date NOT NULL,
  `dateModification` date NOT NULL,
  `idFicheFrais` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idetat` (`idetat`),
  KEY `idFicheFrais` (`idFicheFrais`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=126 ;

--
-- Contenu de la table `lignefraishorsfrais`
--

INSERT INTO `lignefraishorsfrais` (`id`, `idetat`, `date`, `montant`, `libelle`, `dateCreation`, `dateModification`, `idFicheFrais`) VALUES
(8, 2, '2016-02-10', 9, 'Repas midi', '2015-12-18', '2016-02-10', NULL),
(9, 2, '2014-08-03', 66, 'Nuitee', '2015-12-18', '2015-12-18', NULL),
(10, 1, '2020-04-05', 55, 'Repas midi', '2015-12-22', '2015-12-22', 1),
(11, 1, '2016-02-02', 55, 'Repas midi', '2015-12-31', '2015-12-31', 1),
(123, 1, '2011-03-04', 4, 'Repas midi', '2016-03-01', '2016-03-01', NULL),
(124, 1, '2013-04-02', 9, 'Repas midi', '2016-03-01', '2016-03-01', NULL),
(125, 1, '2013-01-02', 55, 'Repas midi', '2016-03-11', '2016-03-11', 9);

--
-- Contraintes pour les tables exportées
--

--
-- Contraintes pour la table `fichefrais`
--
ALTER TABLE `fichefrais`
  ADD CONSTRAINT `FK_92D5AB08860506C2` FOREIGN KEY (`idetat`) REFERENCES `etat` (`id`),
  ADD CONSTRAINT `FK_92D5AB08F2C56620` FOREIGN KEY (`compte_id`) REFERENCES `comptes` (`id`);

--
-- Contraintes pour la table `fraisforfait`
--
ALTER TABLE `fraisforfait`
  ADD CONSTRAINT `fraisforfait_ibfk_1` FOREIGN KEY (`idetat`) REFERENCES `etat` (`id`);

--
-- Contraintes pour la table `lignefraisforfait`
--
ALTER TABLE `lignefraisforfait`
  ADD CONSTRAINT `FK_ED4F43424134ACE6` FOREIGN KEY (`idFraisForfait`) REFERENCES `fraisforfait` (`id`),
  ADD CONSTRAINT `FK_ED4F4342D1E09AE6` FOREIGN KEY (`idFicheFrais`) REFERENCES `fichefrais` (`id`),
  ADD CONSTRAINT `lignefraisforfait_ibfk_1` FOREIGN KEY (`idetat`) REFERENCES `etat` (`id`);

--
-- Contraintes pour la table `lignefraishorsfrais`
--
ALTER TABLE `lignefraishorsfrais`
  ADD CONSTRAINT `FK_A57C17DAD1E09AE6` FOREIGN KEY (`idFicheFrais`) REFERENCES `fichefrais` (`id`),
  ADD CONSTRAINT `lignefraishorsfrais_ibfk_1` FOREIGN KEY (`idetat`) REFERENCES `etat` (`id`);

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