-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 04 fév. 2022 à 15:03
-- Version du serveur :  8.0.21
-- Version de PHP : 8.0.6

START TRANSACTION;



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

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

--
-- Structure de la table `abonnement`
--

CREATE TABLE IF NOT EXISTS `abonnement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `list_abonnement_id` int DEFAULT NULL,
  `cabinet_id` int DEFAULT NULL,
  `date_debut` datetime NOT NULL,
  `date_fin` datetime DEFAULT NULL,
  `is_disabled` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_351268BB7BC8681A` (`list_abonnement_id`),
  KEY `IDX_351268BBD351EC` (`cabinet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `abonnement` (`id`, `list_abonnement_id`, `cabinet_id`, `date_debut`, `date_fin`, `is_disabled`) VALUES
(14, 1, 2, '2021-07-27 16:17:34', '2021-07-27 16:17:34', 1);

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

--
-- Structure de la table `cabinet`
--

CREATE TABLE IF NOT EXISTS `cabinet` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `groupe_id` int DEFAULT NULL,
  `is_delete` tinyint(1) DEFAULT NULL,
  `chef_cabinet_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4CED05B07A45358C` (`groupe_id`),
  KEY `IDX_4CED05B0E7B80DBF` (`chef_cabinet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `cabinet` (`id`, `nom`, `groupe_id`, `is_delete`, `chef_cabinet_id`) VALUES
(2, 'new name', NULL, 0, 2),
(3, 'LOl', NULL, 1, 1),
(28, 'tezefzest', NULL, NULL, 1),
(29, 'tezefzest', NULL, NULL, 1),
(30, 'rayyy', NULL, NULL, 1),
(31, 'ezafaze', NULL, NULL, 1),
(32, 'zaef', NULL, NULL, 1),
(33, 'da', NULL, NULL, 1),
(34, 'pmol', NULL, NULL, 1),
(35, 'Cabinet Finance', NULL, NULL, 1),
(36, 'rayyy', NULL, NULL, 1),
(37, 'rayyy', NULL, NULL, 1),
(60, 'azef', NULL, NULL, 1),
(61, 'asfa', NULL, NULL, 1),
(62, 'aezrfzea', NULL, NULL, 5),
(66, 'arrrr', NULL, NULL, 6),
(67, 'azefaz', NULL, NULL, 6),
(68, 'Mon cabinet', NULL, NULL, 8);

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

--
-- Structure de la table `cabinet_list_disabled_users`
--

CREATE TABLE IF NOT EXISTS `cabinet_list_disabled_users` (
  `cabinet_id` int NOT NULL,
  `list_disabled_users_id` int NOT NULL,
  PRIMARY KEY (`cabinet_id`,`list_disabled_users_id`),
  KEY `IDX_70D26FE2D351EC` (`cabinet_id`),
  KEY `IDX_70D26FE2B2A17D1E` (`list_disabled_users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `cabinet_list_disabled_users` (`cabinet_id`, `list_disabled_users_id`) VALUES
(32, 23);

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

--
-- Structure de la table `doctrine_migration_versions`
--

CREATE TABLE IF NOT EXISTS `doctrine_migration_versions` (
  `version` varchar(191) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `executed_at` datetime DEFAULT NULL,
  `execution_time` int DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

INSERT INTO `doctrine_migration_versions` (`version`, `executed_at`, `execution_time`) VALUES
('DoctrineMigrations\\Version20211213171740', '2021-12-13 17:17:47', 1285),
('DoctrineMigrations\\Version20220124163909', '2022-01-24 16:39:18', 2079),
('DoctrineMigrations\\Version20220124164206', '2022-01-24 16:42:12', 139),
('DoctrineMigrations\\Version20220124164225', '2022-01-24 16:42:31', 668),
('DoctrineMigrations\\Version20220128162059', '2022-01-28 16:21:06', 917);

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

--
-- Structure de la table `dossier`
--

CREATE TABLE IF NOT EXISTS `dossier` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date_create` datetime NOT NULL,
  `code_interne` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mois_cloture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `rythme_pes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cabinet_id` int DEFAULT NULL,
  `code_ape` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `fiscalite` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tel` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_3D48E037D351EC` (`cabinet_id`),
  KEY `IDX_3D48E037A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `dossier` (`id`, `date_create`, `code_interne`, `mois_cloture`, `rythme_pes`, `cabinet_id`, `code_ape`, `fiscalite`, `tel`, `entreprise_id`) VALUES
(15, '2021-12-10 17:06:28', 'caz', '1', 'm', 2, '69.20Z', 'is', '0610194978', 1),
(18, '2021-12-13 17:23:17', 'aze', '2', 's', 2, 'ezeeez', 'is', '0610194938', 4);

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

--
-- Structure de la table `dossier_archive`
--

CREATE TABLE IF NOT EXISTS `dossier_archive` (
  `id` int NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `dossier_user`
--

CREATE TABLE IF NOT EXISTS `dossier_user` (
  `dossier_id` int NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`dossier_id`,`user_id`),
  KEY `IDX_1A9173A611C0C56` (`dossier_id`),
  KEY `IDX_1A9173AA76ED395` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `dossier_user` (`dossier_id`, `user_id`) VALUES
(15, 1);

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

--
-- Structure de la table `entreprise`
--

CREATE TABLE IF NOT EXISTS `entreprise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `raison_sociale` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `siren` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `entreprise` (`id`, `raison_sociale`, `siren`) VALUES
(1, 'Société à responsabilité limitée (sans autre indication)', '442600375'),
(4, 'saluit', '123456789');

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

--
-- Structure de la table `facture`
--

CREATE TABLE IF NOT EXISTS `facture` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cabinet_id` int NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `pdf` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` datetime NOT NULL,
  `abonnement_id` int DEFAULT NULL,
  `prix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_FE866410D351EC` (`cabinet_id`),
  KEY `IDX_FE866410F1D74413` (`abonnement_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `facture` (`id`, `cabinet_id`, `nom`, `pdf`, `date`, `abonnement_id`, `prix`) VALUES
(1, 2, 'FIRST PDF', 'Facture.pdf', '2021-07-14 11:53:39', 14, '30'),
(3, 2, '2 eme pdf', 'eaf2.pdf', '2021-07-08 17:57:02', 14, '30'),
(4, 3, 'facture 3', 'aze', '2021-07-30 18:13:59', 14, '30');

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

--
-- Structure de la table `grand_livre`
--

CREATE TABLE IF NOT EXISTS `grand_livre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ecriture_date` datetime NOT NULL,
  `debit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `credit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `journal_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `journal_lib` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ecriture_num` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `compte_num` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `compte_lib` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `compte_aux_num` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `compte_aux_lib` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `piece_ref` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `piece_date` datetime NOT NULL,
  `ecriture_lib` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ecriture_let` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_let` datetime DEFAULT NULL,
  `valid_date` datetime DEFAULT NULL,
  `montant_devise` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `i_devise` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_86CD2ACCA4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `grand_livre` (`id`, `ecriture_date`, `debit`, `credit`, `journal_code`, `journal_lib`, `ecriture_num`, `compte_num`, `compte_lib`, `compte_aux_num`, `compte_aux_lib`, `piece_ref`, `piece_date`, `ecriture_lib`, `ecriture_let`, `date_let`, `valid_date`, `montant_devise`, `i_devise`, `entreprise_id`) VALUES
(1, '2021-12-13 16:59:58', '50', '50', '80', 'aze', 'z54a', '541', '54', '41', '41', '452', '2021-12-13 16:59:58', 'aze', 'zae', '2021-12-22 16:59:58', '2021-12-14 16:59:58', '45', '44', 1);

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

--
-- Structure de la table `groupe`
--

CREATE TABLE IF NOT EXISTS `groupe` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `chef_groupe_cabinet_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_4B98C217405644B` (`chef_groupe_cabinet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `list_abonnement`
--

CREATE TABLE IF NOT EXISTS `list_abonnement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `prix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `temps` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_active` tinyint(1) DEFAULT NULL,
  `credit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `list_abonnement` (`id`, `prix`, `temps`, `is_active`, `credit`, `nom`, `description`) VALUES
(1, '99', '15', NULL, '30', 'Premier abo', NULL),
(2, '49', '15', NULL, '10', '2eme abo', NULL);

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

--
-- Structure de la table `list_disabled_users`
--

CREATE TABLE IF NOT EXISTS `list_disabled_users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `admin_action_this_user_id` int NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D1BA9C35A76ED395` (`user_id`),
  KEY `IDX_D1BA9C353D230B4F` (`admin_action_this_user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `list_disabled_users` (`id`, `user_id`, `admin_action_this_user_id`, `date`) VALUES
(20, 3, 1, '2021-07-20 13:51:38'),
(21, 2, 1, '2021-07-20 14:17:42'),
(22, 3, 1, '2021-07-20 14:20:53'),
(23, 3, 1, '2021-07-20 14:21:00'),
(24, 3, 1, '2021-07-20 14:26:43'),
(25, 3, 1, '2021-07-20 14:27:02'),
(26, 3, 1, '2021-07-20 14:27:03'),
(27, 3, 1, '2021-07-20 14:27:07'),
(28, 3, 1, '2021-07-20 14:27:09'),
(29, 3, 1, '2021-07-20 14:27:11'),
(30, 3, 1, '2021-07-20 14:27:12'),
(31, 3, 1, '2021-07-20 14:27:14'),
(32, 3, 1, '2021-07-20 14:27:21'),
(33, 3, 1, '2021-07-20 14:27:37'),
(34, 3, 1, '2021-07-20 14:27:38'),
(35, 3, 1, '2021-07-22 16:24:04'),
(36, 3, 1, '2021-07-22 16:24:06'),
(37, 3, 1, '2021-07-22 16:24:14'),
(38, 3, 1, '2021-07-22 16:24:18'),
(39, 3, 1, '2021-07-23 08:29:41'),
(40, 3, 1, '2021-07-23 12:29:30'),
(41, 3, 1, '2021-07-23 12:29:31'),
(42, 4, 1, '2021-07-23 12:43:10');

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

--
-- Structure de la table `list_privilege`
--

CREATE TABLE IF NOT EXISTS `list_privilege` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `list_privilege` (`id`, `nom`) VALUES
(2, 'seeDataUserCabinet'),
(3, 'activeUserCabinet'),
(4, 'addPrivilege'),
(5, 'disabledUserInCabinet'),
(7, 'removePrivilege'),
(8, 'addDossier'),
(9, 'changeStylesPage');

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

--
-- Structure de la table `logo`
--

CREATE TABLE IF NOT EXISTS `logo` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cabinet_id` int DEFAULT NULL,
  `path_logo` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `name_page` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `emplacement` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E48E9A13D351EC` (`cabinet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `page_styles`
--

CREATE TABLE IF NOT EXISTS `page_styles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cabinet_id` int DEFAULT NULL,
  `name_path` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `styles` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_D98C0CEBD351EC` (`cabinet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `page_styles` (`id`, `cabinet_id`, `name_path`, `styles`) VALUES
(7, 2, 'ReponsesFournisseurs', '{\"menuNavPointsEnSuspens\":{\"backgroundColor\":\"\",\"color\":\"#a4b5d1\",\"colorHover\":\"white\",\"colorActive\":\"rgb(68, 114, 196)\",\"backgroundColorHover\":\"#950367\",\"backgroundColorActive\":\"white\",\"tmpbackgroundColorHover\":\"#950367\",\"tmpcolorHover\":\"white\",\"tmpbackgroundColorActive\":\"white\"},\"menuLeftTxt\":{\"color\":\"white\",\"tmpcolor\":\"white\"},\"menuLeft\":{\"backgroundColor\":\"#a4b5d1\",\"backgroundColorActive\":\"#c5e2f9\",\"borderColor\":\"#a4b5d1\",\"tmpbackgroundColorActive\":\"#c5e2f9\",\"tmpbackgroundColor\":\"#a4b5d1\"},\"boxQuestion\":{\"backgroundColorValide\":\"limegreen\",\"backgroundColor\":\"#a4b5d1\",\"tmpbackgroundColor\":\"rgb(68, 114, 196)\",\"backgroundColorActive\":\"#b5007c\",\"tmpbackgroundColorActive\":\"#b5007c\",\"tmpbackgroundColorValide\":\"limegreen\"},\"backgroundColorQuestion\":{\"backgroundColorPair\":\"#638ab3\",\"backgroundColorOdd\":\"#bbd7e1\",\"tmpbackgroundColorOdd\":\"#a1e5ff\",\"tmpbackgroundColorPair\":\"#638ab3\"},\"iHaveQuestion\":{\"backgroundColor\":\"white\",\"color\":\"#4472c4\"},\"proofFirstBtn\":{\"backgroundColor\":\"rgba(233,150,122,0.95)\",\"color\":\"white\"},\"proofFirstChoicesBtn1\":{\"backgroundColor\":\"rgba(0,128,128,0.6)\",\"color\":\"white\"},\"proofFirstChoicesBtn2\":{\"backgroundColor\":\"rgb(13, 152, 186)\",\"color\":\"white\"},\"proofLastChoicesBtn1\":{\"backgroundColor\":\"rgba(0,128,128,0.6)\",\"color\":\"white\"},\"proofLastChoicesBtn2\":{\"backgroundColor\":\"rgb(73 103 147)\",\"color\":\"white\"},\"proofBtnValid\":{\"backgroundColor\":\"rgba(0,128,128,0.6)\",\"color\":\"white\"}}');

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

--
-- Structure de la table `point_en_suspens`
--

CREATE TABLE IF NOT EXISTS `point_en_suspens` (
  `id` int NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `privilege`
--

CREATE TABLE IF NOT EXISTS `privilege` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cabinet_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_87209A87D351EC` (`cabinet_id`),
  KEY `IDX_87209A87A76ED395` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `privilege` (`id`, `cabinet_id`, `user_id`, `nom`) VALUES
(1, 2, 1, 'seeDataUserCabinet'),
(4, 3, 2, 'addPrivilege'),
(12, 3, 1, 'joinGroupeCabinet'),
(18, 2, 1, 'disabledUserInCabinete'),
(20, 2, 1, 'addUserCabinet'),
(21, 2, 1, 'disabledUserCabinet'),
(23, 2, 1, 'activeUserCabinet'),
(24, 2, 1, 'addPrivilege'),
(25, 2, 2, 'disabledUserInCabinet'),
(26, 2, 1, 'removePrivilege'),
(36, 2, 3, 'seeDataUserCabinet'),
(47, 2, 5, 'seeDataUserCabinet'),
(59, 2, 6, 'seeDataUserCabinet'),
(60, 2, 6, 'addPrivilege'),
(61, 2, 4, 'seeDataUserCabinet'),
(62, 2, 4, 'disabledUserInCabinet'),
(63, 2, 4, 'activeUserCabinet'),
(66, 2, 6, 'removePrivilege'),
(67, 2, 1, 'addAbo'),
(69, 2, 8, 'seeDataUserCabinet'),
(71, 2, 8, 'disabledUserInCabinet'),
(72, 2, 8, 'activeUserCabinet'),
(73, 2, 8, 'addPrivilege'),
(74, 2, 8, 'removePrivilege'),
(75, 2, 9, 'seeDataUserCabinet'),
(76, 2, 9, 'disabledUserInCabinet'),
(77, 2, 9, 'activeUserCabinet'),
(78, 2, 1, 'getFactureUserCabinet'),
(79, 2, 1, 'getAboCabinet'),
(81, 2, 1, 'addDossier'),
(82, 2, 1, 'changeStylesPage');

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

--
-- Structure de la table `question`
--

CREATE TABLE IF NOT EXISTS `question` (
  `id` int NOT NULL AUTO_INCREMENT,
  `corbeille_enfant_id` int DEFAULT NULL,
  `question` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL,
  `response` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `point_en_suspens_id` int DEFAULT NULL,
  `question_enfant_id` int DEFAULT NULL,
  `is_corbeille_enfant` tinyint(1) NOT NULL,
  `grand_livre_id` int DEFAULT NULL,
  `dossier_id` int DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_B6F7494E744AD8B7` (`grand_livre_id`),
  KEY `IDX_B6F7494E2DB45087` (`corbeille_enfant_id`),
  KEY `IDX_B6F7494E8BE8294F` (`point_en_suspens_id`),
  KEY `IDX_B6F7494E4CD861B2` (`question_enfant_id`),
  KEY `IDX_B6F7494E611C0C56` (`dossier_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `question` (`id`, `corbeille_enfant_id`, `question`, `active`, `response`, `point_en_suspens_id`, `question_enfant_id`, `is_corbeille_enfant`, `grand_livre_id`, `dossier_id`, `type`) VALUES
(1, NULL, 'La premiere question  : )', 0, NULL, NULL, NULL, 0, NULL, 15, 'Clients'),
(2, NULL, '[1] enfant de la premier question', 0, NULL, NULL, 1, 0, NULL, NULL, 'Clients'),
(3, NULL, '[2] enfant de la premier question', 0, NULL, NULL, 1, 0, NULL, NULL, 'Clients'),
(4, NULL, 'La question : ', 0, 'zre', NULL, NULL, 0, 1, 15, 'Clients');

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

--
-- Structure de la table `question_archive`
--

CREATE TABLE IF NOT EXISTS `question_archive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `corbeille_enfant_id` int DEFAULT NULL,
  `question_archive_id` int DEFAULT NULL,
  `question_enfant_id` int DEFAULT NULL,
  `question` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL,
  `response` longtext COLLATE utf8mb4_unicode_ci,
  `is_corbeille_enfant` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_DB2088812DB45087` (`corbeille_enfant_id`),
  KEY `IDX_DB2088814E8286D7` (`question_archive_id`),
  KEY `IDX_DB2088814CD861B2` (`question_enfant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `users_dossierapprentie`
--

CREATE TABLE IF NOT EXISTS `users_dossierapprentie` (
  `dossier_id` int NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`dossier_id`,`user_id`),
  KEY `IDX_78D8C0EC611C0C56` (`dossier_id`),
  KEY `IDX_78D8C0ECA76ED395` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `users_dossierchefmision`
--

CREATE TABLE IF NOT EXISTS `users_dossierchefmision` (
  `dossier_id` int NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`dossier_id`,`user_id`),
  KEY `IDX_5B0CE9FF611C0C56` (`dossier_id`),
  KEY `IDX_5B0CE9FFA76ED395` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `users_dossiercollaborateur`
--

CREATE TABLE IF NOT EXISTS `users_dossiercollaborateur` (
  `dossier_id` int NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`dossier_id`,`user_id`),
  KEY `IDX_D2F5A18611C0C56` (`dossier_id`),
  KEY `IDX_D2F5A18A76ED395` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users_dossiercollaborateur` (`dossier_id`, `user_id`) VALUES
(15, 2),
(15, 5),
(18, 2),
(18, 5);

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

--
-- Structure de la table `users_dossierexpertcomptables`
--

CREATE TABLE IF NOT EXISTS `users_dossierexpertcomptables` (
  `dossier_id` int NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`dossier_id`,`user_id`),
  KEY `IDX_4AA2812B611C0C56` (`dossier_id`),
  KEY `IDX_4AA2812BA76ED395` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users_dossierexpertcomptables` (`dossier_id`, `user_id`) VALUES
(15, 2),
(15, 5),
(18, 2),
(18, 5);

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

--
-- Structure de la table `user_cabinet`
--

CREATE TABLE IF NOT EXISTS `user_cabinet` (
  `user_id` int NOT NULL,
  `cabinet_id` int NOT NULL,
  PRIMARY KEY (`user_id`,`cabinet_id`),
  KEY `IDX_14E01BBAA76ED395` (`user_id`),
  KEY `IDX_14E01BBAD351EC` (`cabinet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `user_cabinet` (`user_id`, `cabinet_id`) VALUES
(1, 2),
(1, 3),
(1, 30),
(1, 31),
(1, 32),
(1, 33),
(1, 34),
(1, 35),
(1, 36),
(1, 37),
(1, 60),
(1, 61),
(2, 2),
(2, 3),
(2, 32),
(3, 2),
(3, 33),
(4, 2),
(5, 2),
(5, 62),
(6, 2),
(6, 66),
(6, 67),
(8, 2),
(8, 68),
(9, 2);

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

--
-- Structure de la table `validation_attente`
--

CREATE TABLE IF NOT EXISTS `validation_attente` (
  `id` int NOT NULL AUTO_INCREMENT,
  `groupe_id` int NOT NULL,
  `cabinet_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_5F304C77A45358C` (`groupe_id`),
  KEY `IDX_5F304C7D351EC` (`cabinet_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Contraintes pour la table `abonnement`
--
ALTER TABLE `abonnement`
  ADD CONSTRAINT `FK_351268BB7BC8681A` FOREIGN KEY (`list_abonnement_id`) REFERENCES `list_abonnement` (`id`),
  ADD CONSTRAINT `FK_351268BBD351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`);

--
-- Contraintes pour la table `cabinet`
--
ALTER TABLE `cabinet`
  ADD CONSTRAINT `FK_4CED05B07A45358C` FOREIGN KEY (`groupe_id`) REFERENCES `groupe` (`id`),
  ADD CONSTRAINT `FK_4CED05B0E7B80DBF` FOREIGN KEY (`chef_cabinet_id`) REFERENCES `user` (`id`);

--
-- Contraintes pour la table `cabinet_list_disabled_users`
--
ALTER TABLE `cabinet_list_disabled_users`
  ADD CONSTRAINT `FK_70D26FE2B2A17D1E` FOREIGN KEY (`list_disabled_users_id`) REFERENCES `list_disabled_users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_70D26FE2D351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `dossier`
--
ALTER TABLE `dossier`
  ADD CONSTRAINT `FK_3D48E037A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_3D48E037D351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`);

--
-- Contraintes pour la table `dossier_user`
--
ALTER TABLE `dossier_user`
  ADD CONSTRAINT `FK_1A9173A611C0C56` FOREIGN KEY (`dossier_id`) REFERENCES `dossier` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_1A9173AA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `facture`
--
ALTER TABLE `facture`
  ADD CONSTRAINT `FK_FE866410D351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`),
  ADD CONSTRAINT `FK_FE866410F1D74413` FOREIGN KEY (`abonnement_id`) REFERENCES `abonnement` (`id`);

--
-- Contraintes pour la table `grand_livre`
--
ALTER TABLE `grand_livre`
  ADD CONSTRAINT `FK_86CD2ACCA4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`);

--
-- Contraintes pour la table `groupe`
--
ALTER TABLE `groupe`
  ADD CONSTRAINT `FK_4B98C217405644B` FOREIGN KEY (`chef_groupe_cabinet_id`) REFERENCES `cabinet` (`id`);

--
-- Contraintes pour la table `list_disabled_users`
--
ALTER TABLE `list_disabled_users`
  ADD CONSTRAINT `FK_D1BA9C353D230B4F` FOREIGN KEY (`admin_action_this_user_id`) REFERENCES `user` (`id`),
  ADD CONSTRAINT `FK_D1BA9C35A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`);

--
-- Contraintes pour la table `logo`
--
ALTER TABLE `logo`
  ADD CONSTRAINT `FK_E48E9A13D351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`);

--
-- Contraintes pour la table `page_styles`
--
ALTER TABLE `page_styles`
  ADD CONSTRAINT `FK_D98C0CEBD351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`);

--
-- Contraintes pour la table `privilege`
--
ALTER TABLE `privilege`
  ADD CONSTRAINT `FK_87209A87A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
  ADD CONSTRAINT `FK_87209A87D351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`);

--
-- Contraintes pour la table `question`
--
ALTER TABLE `question`
  ADD CONSTRAINT `FK_B6F7494E2DB45087` FOREIGN KEY (`corbeille_enfant_id`) REFERENCES `question` (`id`),
  ADD CONSTRAINT `FK_B6F7494E4CD861B2` FOREIGN KEY (`question_enfant_id`) REFERENCES `question` (`id`),
  ADD CONSTRAINT `FK_B6F7494E611C0C56` FOREIGN KEY (`dossier_id`) REFERENCES `dossier` (`id`),
  ADD CONSTRAINT `FK_B6F7494E744AD8B7` FOREIGN KEY (`grand_livre_id`) REFERENCES `grand_livre` (`id`),
  ADD CONSTRAINT `FK_B6F7494E8BE8294F` FOREIGN KEY (`point_en_suspens_id`) REFERENCES `point_en_suspens` (`id`);

--
-- Contraintes pour la table `question_archive`
--
ALTER TABLE `question_archive`
  ADD CONSTRAINT `FK_DB2088812DB45087` FOREIGN KEY (`corbeille_enfant_id`) REFERENCES `question_archive` (`id`),
  ADD CONSTRAINT `FK_DB2088814CD861B2` FOREIGN KEY (`question_enfant_id`) REFERENCES `question_archive` (`id`),
  ADD CONSTRAINT `FK_DB2088814E8286D7` FOREIGN KEY (`question_archive_id`) REFERENCES `question_archive` (`id`);

--
-- Contraintes pour la table `users_dossierapprentie`
--
ALTER TABLE `users_dossierapprentie`
  ADD CONSTRAINT `FK_78D8C0EC611C0C56` FOREIGN KEY (`dossier_id`) REFERENCES `dossier` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_78D8C0ECA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `users_dossierchefmision`
--
ALTER TABLE `users_dossierchefmision`
  ADD CONSTRAINT `FK_5B0CE9FF611C0C56` FOREIGN KEY (`dossier_id`) REFERENCES `dossier` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_5B0CE9FFA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `users_dossiercollaborateur`
--
ALTER TABLE `users_dossiercollaborateur`
  ADD CONSTRAINT `FK_D2F5A18611C0C56` FOREIGN KEY (`dossier_id`) REFERENCES `dossier` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_D2F5A18A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `users_dossierexpertcomptables`
--
ALTER TABLE `users_dossierexpertcomptables`
  ADD CONSTRAINT `FK_4AA2812B611C0C56` FOREIGN KEY (`dossier_id`) REFERENCES `dossier` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_4AA2812BA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `user_cabinet`
--
ALTER TABLE `user_cabinet`
  ADD CONSTRAINT `FK_14E01BBAA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_14E01BBAD351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `validation_attente`
--
ALTER TABLE `validation_attente`
  ADD CONSTRAINT `FK_5F304C77A45358C` FOREIGN KEY (`groupe_id`) REFERENCES `groupe` (`id`),
  ADD CONSTRAINT `FK_5F304C7D351EC` FOREIGN KEY (`cabinet_id`) REFERENCES `cabinet` (`id`);
COMMIT;

