-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 25 juin 2024 à 07:14
-- Version du serveur : 8.2.0
-- Version de PHP : 8.2.13

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
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 utf8mb4 */;

--
-- Base de données : `renfortimmo`
--

-- --------------------------------------------------------

--
-- Structure de la table `access`
--

DROP TABLE IF EXISTS `access`;
CREATE TABLE IF NOT EXISTS `access` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `disponibilite` tinyint(1) DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_6692B548A2D8B41` (`terrain_id`),
  KEY `IDX_6692B54C54C8C93` (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `accompte`
--

DROP TABLE IF EXISTS `accompte`;
CREATE TABLE IF NOT EXISTS `accompte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `prix` decimal(10,0) NOT NULL,
  `date` date NOT NULL,
  `payer` tinyint(1) NOT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_BD09DAF741DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_int_notaire`
--

DROP TABLE IF EXISTS `act_int_notaire`;
CREATE TABLE IF NOT EXISTS `act_int_notaire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_E7C229EE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_int_proprio`
--

DROP TABLE IF EXISTS `act_int_proprio`;
CREATE TABLE IF NOT EXISTS `act_int_proprio` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C96E27448A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_int_voisin`
--

DROP TABLE IF EXISTS `act_int_voisin`;
CREATE TABLE IF NOT EXISTS `act_int_voisin` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_333BBDA88A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_rdv_hypotheque`
--

DROP TABLE IF EXISTS `act_rdv_hypotheque`;
CREATE TABLE IF NOT EXISTS `act_rdv_hypotheque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_3BF55D6E8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `act_rendez_vserv_urb`
--

DROP TABLE IF EXISTS `act_rendez_vserv_urb`;
CREATE TABLE IF NOT EXISTS `act_rendez_vserv_urb` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B058530C8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `adresse`
--

DROP TABLE IF EXISTS `adresse`;
CREATE TABLE IF NOT EXISTS `adresse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `contact_id` int DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  `rue` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `code_postal` int DEFAULT NULL,
  `ville` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `departement` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `region` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pays` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `facturation` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C35F0816F6203804` (`statut_id`),
  KEY `IDX_C35F0816E7A1254A` (`contact_id`),
  KEY `IDX_C35F0816A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `analyse`
--

DROP TABLE IF EXISTS `analyse`;
CREATE TABLE IF NOT EXISTS `analyse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `titre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `observations` longtext COLLATE utf8mb4_unicode_ci,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `appels_recus`
--

DROP TABLE IF EXISTS `appels_recus`;
CREATE TABLE IF NOT EXISTS `appels_recus` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `date` datetime NOT NULL,
  `objet` longtext COLLATE utf8mb4_unicode_ci,
  `appeller` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2F9E5C3AE7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `aspect_exterieur`
--

DROP TABLE IF EXISTS `aspect_exterieur`;
CREATE TABLE IF NOT EXISTS `aspect_exterieur` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8214C4838A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `bati_environant`
--

DROP TABLE IF EXISTS `bati_environant`;
CREATE TABLE IF NOT EXISTS `bati_environant` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `bati_environant`
--

INSERT INTO `bati_environant` (`id`, `statut`) VALUES
(1, 'Immeubles'),
(2, 'Maisons Individuelles'),
(3, 'Locaux d\'activité'),
(4, 'Mixte');

-- --------------------------------------------------------

--
-- Structure de la table `caract_gene_zone`
--

DROP TABLE IF EXISTS `caract_gene_zone`;
CREATE TABLE IF NOT EXISTS `caract_gene_zone` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_9EEE76B68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `caract_terrain`
--

DROP TABLE IF EXISTS `caract_terrain`;
CREATE TABLE IF NOT EXISTS `caract_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `distance` decimal(10,0) 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 `caract_terrain`
--

INSERT INTO `caract_terrain` (`id`, `name`, `distance`) VALUES
(1, 'Réglementée', NULL),
(2, 'Non Réglementée', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `ces`
--

DROP TABLE IF EXISTS `ces`;
CREATE TABLE IF NOT EXISTS `ces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ces_max` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6456130F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `classe`
--

DROP TABLE IF EXISTS `classe`;
CREATE TABLE IF NOT EXISTS `classe` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `classe`
--

INSERT INTO `classe` (`id`, `name`) VALUES
(1, 'Titre de propriété'),
(2, 'Indivision'),
(3, 'autre'),
(4, 'accès'),
(5, 'Limite'),
(6, 'Assiette'),
(7, 'Bornage'),
(8, 'Servitude de passage'),
(9, 'Servitude réseaux'),
(10, 'Négociation'),
(11, 'Offre');

-- --------------------------------------------------------

--
-- Structure de la table `classement_terrain`
--

DROP TABLE IF EXISTS `classement_terrain`;
CREATE TABLE IF NOT EXISTS `classement_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `zonage` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `extrait_oap` tinyint(1) DEFAULT NULL,
  `plan_zonage` tinyint(1) DEFAULT NULL,
  `soumis_oap` tinyint(1) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_A5722A138A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `commande_bornage`
--

DROP TABLE IF EXISTS `commande_bornage`;
CREATE TABLE IF NOT EXISTS `commande_bornage` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_88C6B7A28A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `communication`
--

DROP TABLE IF EXISTS `communication`;
CREATE TABLE IF NOT EXISTS `communication` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  `statut_id` int NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `forfait` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_F9AFB5EBD2235D39` (`tache_id`),
  KEY `IDX_F9AFB5EBF6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_remarque`
--

DROP TABLE IF EXISTS `concl_remarque`;
CREATE TABLE IF NOT EXISTS `concl_remarque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_BAB73CEA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_risque`
--

DROP TABLE IF EXISTS `concl_risque`;
CREATE TABLE IF NOT EXISTS `concl_risque` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_saitpas` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8ECD13E68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_servitude_prive`
--

DROP TABLE IF EXISTS `concl_servitude_prive`;
CREATE TABLE IF NOT EXISTS `concl_servitude_prive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_737D559A8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `concl_servitude_publique`
--

DROP TABLE IF EXISTS `concl_servitude_publique`;
CREATE TABLE IF NOT EXISTS `concl_servitude_publique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_13F8A4028A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `contact`
--

DROP TABLE IF EXISTS `contact`;
CREATE TABLE IF NOT EXISTS `contact` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int DEFAULT NULL,
  `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entreprise` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `poste` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `origine` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `agence` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `service` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4C62E638F6203804` (`statut_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `contact`
--

INSERT INTO `contact` (`id`, `statut_id`, `nom`, `prenom`, `entreprise`, `poste`, `origine`, `agence`, `status`, `service`) VALUES
(1, 9, 'Cecile', 'Philippe', 'Renfort Immo', 'developpeur', 'guadeloupe', 'Toulouse', NULL, 'adminiqtratif');

-- --------------------------------------------------------

--
-- Structure de la table `contenance_bornage`
--

DROP TABLE IF EXISTS `contenance_bornage`;
CREATE TABLE IF NOT EXISTS `contenance_bornage` (
  `id` int NOT NULL AUTO_INCREMENT,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `bornage_en_cour` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_44DF503A8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `contenance_cadastrale`
--

DROP TABLE IF EXISTS `contenance_cadastrale`;
CREATE TABLE IF NOT EXISTS `contenance_cadastrale` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_8E3E2678A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `demenbrement_prop`
--

DROP TABLE IF EXISTS `demenbrement_prop`;
CREATE TABLE IF NOT EXISTS `demenbrement_prop` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D7DCF5968A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `densite`
--

DROP TABLE IF EXISTS `densite`;
CREATE TABLE IF NOT EXISTS `densite` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `densite`
--

INSERT INTO `densite` (`id`, `name`) VALUES
(1, 'Dense'),
(2, 'Peu dense'),
(3, 'Peu dense');

-- --------------------------------------------------------

--
-- Structure de la table `deplacement`
--

DROP TABLE IF EXISTS `deplacement`;
CREATE TABLE IF NOT EXISTS `deplacement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `statut_id` int DEFAULT NULL,
  `lieu` longtext COLLATE utf8mb4_unicode_ci,
  `date` datetime DEFAULT NULL,
  `duree` time DEFAULT NULL,
  `cout` decimal(10,2) DEFAULT NULL,
  `cout_peage` decimal(10,2) DEFAULT NULL,
  `cout_carburant` decimal(10,2) DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `payer` tinyint(1) NOT NULL,
  `kilometrage_depart` decimal(10,0) DEFAULT NULL,
  `kilometrage_arrive` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_1296FAC2D2235D39` (`tache_id`),
  KEY `IDX_1296FAC2F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis`
--

DROP TABLE IF EXISTS `devis`;
CREATE TABLE IF NOT EXISTS `devis` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_deplacement`
--

DROP TABLE IF EXISTS `devis_deplacement`;
CREATE TABLE IF NOT EXISTS `devis_deplacement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BCF731C341DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_hebergement`
--

DROP TABLE IF EXISTS `devis_hebergement`;
CREATE TABLE IF NOT EXISTS `devis_hebergement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix_unitaire` decimal(5,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E633169D41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_prestation`
--

DROP TABLE IF EXISTS `devis_prestation`;
CREATE TABLE IF NOT EXISTS `devis_prestation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E169C44541DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_restauration`
--

DROP TABLE IF EXISTS `devis_restauration`;
CREATE TABLE IF NOT EXISTS `devis_restauration` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_FE224FAC41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `devis_reunion`
--

DROP TABLE IF EXISTS `devis_reunion`;
CREATE TABLE IF NOT EXISTS `devis_reunion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C9EE3FDE41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `doctrine_migration_versions`
--

DROP TABLE IF EXISTS `doctrine_migration_versions`;
CREATE TABLE IF NOT EXISTS `doctrine_migration_versions` (
  `version` varchar(191) COLLATE utf8mb3_unicode_ci NOT NULL,
  `executed_at` datetime DEFAULT NULL,
  `execution_time` int DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_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\\Version20240611081147', '2024-06-20 15:02:24', 19148),
('DoctrineMigrations\\Version20240611082709', '2024-06-20 15:02:43', 299),
('DoctrineMigrations\\Version20240611083124', '2024-06-20 15:02:44', 84),
('DoctrineMigrations\\Version20240611084023', '2024-06-20 15:02:44', 319),
('DoctrineMigrations\\Version20240611084841', '2024-06-20 15:02:44', 86),
('DoctrineMigrations\\Version20240611085141', '2024-06-20 15:02:44', 185),
('DoctrineMigrations\\Version20240611085355', '2024-06-20 15:02:44', 33),
('DoctrineMigrations\\Version20240611091145', '2024-06-20 15:02:44', 211),
('DoctrineMigrations\\Version20240611091730', '2024-06-20 15:02:45', 27),
('DoctrineMigrations\\Version20240611091852', '2024-06-20 15:02:45', 34),
('DoctrineMigrations\\Version20240612070544', '2024-06-20 15:02:45', 29),
('DoctrineMigrations\\Version20240612071015', '2024-06-20 15:02:45', 216),
('DoctrineMigrations\\Version20240612071446', '2024-06-20 15:02:45', 379),
('DoctrineMigrations\\Version20240612074233', '2024-06-20 15:02:45', 200),
('DoctrineMigrations\\Version20240612074824', '2024-06-20 15:02:46', 34),
('DoctrineMigrations\\Version20240612080052', '2024-06-20 15:02:46', 164),
('DoctrineMigrations\\Version20240612080639', '2024-06-20 15:02:46', 30),
('DoctrineMigrations\\Version20240612081423', '2024-06-20 15:02:46', 218),
('DoctrineMigrations\\Version20240612081648', '2024-06-20 15:02:46', 27),
('DoctrineMigrations\\Version20240612082400', '2024-06-20 15:02:46', 34),
('DoctrineMigrations\\Version20240612082616', '2024-06-20 15:02:46', 236),
('DoctrineMigrations\\Version20240612085327', '2024-06-20 15:02:46', 138),
('DoctrineMigrations\\Version20240612085643', '2024-06-20 15:02:46', 190),
('DoctrineMigrations\\Version20240612090535', '2024-06-20 15:02:47', 206),
('DoctrineMigrations\\Version20240612091517', '2024-06-20 15:02:47', 65),
('DoctrineMigrations\\Version20240612092212', '2024-06-20 15:02:47', 205),
('DoctrineMigrations\\Version20240612092603', '2024-06-20 15:02:47', 219),
('DoctrineMigrations\\Version20240612092845', '2024-06-20 15:02:47', 210),
('DoctrineMigrations\\Version20240612093043', '2024-06-20 15:02:48', 187),
('DoctrineMigrations\\Version20240612122316', '2024-06-20 15:02:48', 330),
('DoctrineMigrations\\Version20240612122954', '2024-06-20 15:02:48', 277),
('DoctrineMigrations\\Version20240612124745', '2024-06-20 15:02:48', 167),
('DoctrineMigrations\\Version20240612124911', '2024-06-20 15:02:49', 26),
('DoctrineMigrations\\Version20240612125609', '2024-06-20 15:02:49', 167),
('DoctrineMigrations\\Version20240612130134', '2024-06-20 15:02:49', 37),
('DoctrineMigrations\\Version20240612130548', '2024-06-20 15:02:49', 55),
('DoctrineMigrations\\Version20240612130751', '2024-06-20 15:02:49', 184),
('DoctrineMigrations\\Version20240612131138', '2024-06-20 15:02:49', 164),
('DoctrineMigrations\\Version20240612131614', '2024-06-20 15:02:49', 242),
('DoctrineMigrations\\Version20240612132326', '2024-06-20 15:02:49', 184),
('DoctrineMigrations\\Version20240612132637', '2024-06-20 15:02:50', 219),
('DoctrineMigrations\\Version20240612132826', '2024-06-20 15:02:50', 180),
('DoctrineMigrations\\Version20240612133531', '2024-06-20 15:02:50', 165),
('DoctrineMigrations\\Version20240612134406', '2024-06-20 15:02:50', 194),
('DoctrineMigrations\\Version20240612134612', '2024-06-20 15:02:50', 46),
('DoctrineMigrations\\Version20240612134752', '2024-06-20 15:02:51', 208),
('DoctrineMigrations\\Version20240612135023', '2024-06-20 15:02:51', 36),
('DoctrineMigrations\\Version20240612135135', '2024-06-20 15:02:51', 219),
('DoctrineMigrations\\Version20240612135518', '2024-06-20 15:02:51', 189),
('DoctrineMigrations\\Version20240613071741', '2024-06-20 15:02:51', 238),
('DoctrineMigrations\\Version20240613072152', '2024-06-20 15:02:51', 180),
('DoctrineMigrations\\Version20240613072527', '2024-06-20 15:02:52', 180),
('DoctrineMigrations\\Version20240613073447', '2024-06-20 15:02:52', 219),
('DoctrineMigrations\\Version20240613075457', '2024-06-20 15:02:52', 185),
('DoctrineMigrations\\Version20240613080421', '2024-06-20 15:02:52', 176),
('DoctrineMigrations\\Version20240613081147', '2024-06-20 15:02:52', 158),
('DoctrineMigrations\\Version20240613081539', '2024-06-20 15:02:53', 35),
('DoctrineMigrations\\Version20240613081924', '2024-06-20 15:02:53', 201),
('DoctrineMigrations\\Version20240613082720', '2024-06-20 15:02:53', 191),
('DoctrineMigrations\\Version20240613085431', '2024-06-20 15:02:53', 208),
('DoctrineMigrations\\Version20240613085802', '2024-06-20 15:02:53', 185),
('DoctrineMigrations\\Version20240613090132', '2024-06-20 15:02:53', 168),
('DoctrineMigrations\\Version20240613090318', '2024-06-20 15:02:54', 172),
('DoctrineMigrations\\Version20240613091318', '2024-06-20 15:02:54', 231),
('DoctrineMigrations\\Version20240613092226', '2024-06-20 15:02:54', 400),
('DoctrineMigrations\\Version20240613093126', '2024-06-20 15:02:54', 443),
('DoctrineMigrations\\Version20240613094107', '2024-06-20 15:02:55', 107),
('DoctrineMigrations\\Version20240613110716', '2024-06-20 15:02:55', 164),
('DoctrineMigrations\\Version20240614070845', '2024-06-20 15:02:55', 543),
('DoctrineMigrations\\Version20240614071034', '2024-06-20 15:02:56', 227),
('DoctrineMigrations\\Version20240614071913', '2024-06-20 15:02:56', 166),
('DoctrineMigrations\\Version20240614072757', '2024-06-20 15:02:56', 28),
('DoctrineMigrations\\Version20240614073314', '2024-06-20 15:02:56', 177),
('DoctrineMigrations\\Version20240614074118', '2024-06-20 15:02:56', 211),
('DoctrineMigrations\\Version20240614074730', '2024-06-20 15:02:57', 78),
('DoctrineMigrations\\Version20240614075212', '2024-06-20 15:02:57', 206),
('DoctrineMigrations\\Version20240614080200', '2024-06-20 15:02:57', 132),
('DoctrineMigrations\\Version20240614080353', '2024-06-20 15:02:57', 197),
('DoctrineMigrations\\Version20240614080741', '2024-06-20 15:02:57', 218),
('DoctrineMigrations\\Version20240614082356', '2024-06-20 15:02:57', 272),
('DoctrineMigrations\\Version20240621074154', '2024-06-21 07:42:10', 668),
('DoctrineMigrations\\Version20240621082908', '2024-06-21 08:29:22', 225),
('DoctrineMigrations\\Version20240621085725', '2024-06-21 08:57:43', 59),
('DoctrineMigrations\\Version20240621090301', '2024-06-21 09:03:13', 139),
('DoctrineMigrations\\Version20240621093649', '2024-06-21 09:36:59', 342),
('DoctrineMigrations\\Version20240622093202', '2024-06-22 09:32:12', 631);

-- --------------------------------------------------------

--
-- Structure de la table `document`
--

DROP TABLE IF EXISTS `document`;
CREATE TABLE IF NOT EXISTS `document` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `name` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cout_achat_document` decimal(10,2) DEFAULT NULL,
  `cout_document_commande` decimal(10,2) DEFAULT NULL,
  `cout_document_produit` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D8698A76D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `doc_local_urbanisme`
--

DROP TABLE IF EXISTS `doc_local_urbanisme`;
CREATE TABLE IF NOT EXISTS `doc_local_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  `date_approbation` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  `version_consulte` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_consultation` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  `remarques` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B0D9BF9D8A2D8B41` (`terrain_id`),
  KEY `IDX_B0D9BF9DC54C8C93` (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `eau_terrain`
--

DROP TABLE IF EXISTS `eau_terrain`;
CREATE TABLE IF NOT EXISTS `eau_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `court_deau` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_17090FE78A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `entreprise`
--

DROP TABLE IF EXISTS `entreprise`;
CREATE TABLE IF NOT EXISTS `entreprise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `raison_sociale` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `siret` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `naf` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D19FA60F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `environement`
--

DROP TABLE IF EXISTS `environement`;
CREATE TABLE IF NOT EXISTS `environement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `env_de_type_id` int DEFAULT NULL,
  `bati_environant_id` int DEFAULT NULL,
  `env_perimetre_id` int DEFAULT NULL,
  `env_nuisances_sonores_id` int DEFAULT NULL,
  `env_reseaux_transport_id` int DEFAULT NULL,
  `env_com_serv_id` int DEFAULT NULL,
  `env_equipement_public_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `autres_nuisances` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_19F04B86173F91FD` (`env_de_type_id`),
  KEY `IDX_19F04B8642F9133D` (`bati_environant_id`),
  KEY `IDX_19F04B862F35B472` (`env_perimetre_id`),
  KEY `IDX_19F04B86F932F33C` (`env_nuisances_sonores_id`),
  KEY `IDX_19F04B86503E9859` (`env_reseaux_transport_id`),
  KEY `IDX_19F04B86ACDD68CD` (`env_com_serv_id`),
  KEY `IDX_19F04B86950E4556` (`env_equipement_public_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_autre_nuisances`
--

DROP TABLE IF EXISTS `env_autre_nuisances`;
CREATE TABLE IF NOT EXISTS `env_autre_nuisances` (
  `id` int NOT NULL AUTO_INCREMENT,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `env_com_serv`
--

DROP TABLE IF EXISTS `env_com_serv`;
CREATE TABLE IF NOT EXISTS `env_com_serv` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` longtext COLLATE utf8mb4_unicode_ci,
  `rayon` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_com_serv`
--

INSERT INTO `env_com_serv` (`id`, `statut`, `rayon`) VALUES
(1, 'Commerces de proximité', NULL),
(2, 'Epicerie/supermarché/marché Hebdomadaire', NULL),
(3, 'Café / Restaurant / bar', NULL),
(4, 'Banque / DAB', NULL),
(5, 'Poste', NULL),
(6, 'Pharmacie', NULL),
(7, 'Médecin / maison médicale /professions médicales et parapharmacies', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `env_de_type`
--

DROP TABLE IF EXISTS `env_de_type`;
CREATE TABLE IF NOT EXISTS `env_de_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_de_type`
--

INSERT INTO `env_de_type` (`id`, `statut`) VALUES
(1, 'Urbain'),
(2, 'Péri-urbain'),
(3, 'Rural');

-- --------------------------------------------------------

--
-- Structure de la table `env_equipement_public`
--

DROP TABLE IF EXISTS `env_equipement_public`;
CREATE TABLE IF NOT EXISTS `env_equipement_public` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` longtext COLLATE utf8mb4_unicode_ci,
  `rayon` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_equipement_public`
--

INSERT INTO `env_equipement_public` (`id`, `statut`, `rayon`) VALUES
(1, 'Crèche / école / collège /lycée', NULL),
(2, 'Bibliothèque', NULL),
(3, 'Lieux de culte', NULL),
(4, 'Maison des associations', NULL),
(5, 'Equipements sportifs', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `env_nuisances_sonores`
--

DROP TABLE IF EXISTS `env_nuisances_sonores`;
CREATE TABLE IF NOT EXISTS `env_nuisances_sonores` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_nuisances_sonores`
--

INSERT INTO `env_nuisances_sonores` (`id`, `statut`) VALUES
(1, 'Voie de chemin de fer'),
(2, 'Autoroute ou voie routiere à fort trafic'),
(3, 'Aéroport / aérodrome '),
(4, 'Activité industrielle ou artisanale brurante');

-- --------------------------------------------------------

--
-- Structure de la table `env_perimetre`
--

DROP TABLE IF EXISTS `env_perimetre`;
CREATE TABLE IF NOT EXISTS `env_perimetre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_perimetre`
--

INSERT INTO `env_perimetre` (`id`, `statut`) VALUES
(1, 'De lotissement'),
(2, 'De ZAC'),
(3, 'De zone ou de parc d\'activités'),
(4, 'De zone industrielle ou artisanale'),
(5, 'Ne sais pas');

-- --------------------------------------------------------

--
-- Structure de la table `env_reseaux_transport`
--

DROP TABLE IF EXISTS `env_reseaux_transport`;
CREATE TABLE IF NOT EXISTS `env_reseaux_transport` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` longtext COLLATE utf8mb4_unicode_ci,
  `distance` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `env_reseaux_transport`
--

INSERT INTO `env_reseaux_transport` (`id`, `statut`, `distance`) VALUES
(1, 'Réseau transport en commun', NULL),
(2, 'Piste cyclable', NULL),
(3, 'Principaux axes routiers', NULL),
(4, 'Gare SNCF gare routière', NULL),
(5, 'réseau transport en commun', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `espace_libre`
--

DROP TABLE IF EXISTS `espace_libre`;
CREATE TABLE IF NOT EXISTS `espace_libre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_1AE934EA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `etat`
--

DROP TABLE IF EXISTS `etat`;
CREATE TABLE IF NOT EXISTS `etat` (
  `id` int NOT NULL AUTO_INCREMENT,
  `etat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `etat`
--

INSERT INTO `etat` (`id`, `etat`) VALUES
(1, 'à construire'),
(2, 'à rénover'),
(3, 'à détruire'),
(4, 'à trouver'),
(5, 'à acheter'),
(6, 'à vendre');

-- --------------------------------------------------------

--
-- Structure de la table `etat_des_lieux`
--

DROP TABLE IF EXISTS `etat_des_lieux`;
CREATE TABLE IF NOT EXISTS `etat_des_lieux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `created_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_F7210312F6203804` (`statut_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `forfait`
--

DROP TABLE IF EXISTS `forfait`;
CREATE TABLE IF NOT EXISTS `forfait` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `prix` decimal(10,2) NOT NULL,
  `date` datetime NOT NULL,
  `payer` tinyint(1) NOT NULL,
  `date_reglement` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BBB5C482D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `haut_max_const`
--

DROP TABLE IF EXISTS `haut_max_const`;
CREATE TABLE IF NOT EXISTS `haut_max_const` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `gabarit_max` tinyint(1) DEFAULT NULL,
  `hauteur_max` tinyint(1) DEFAULT NULL,
  `r` decimal(10,0) DEFAULT NULL,
  `h_max` decimal(10,0) DEFAULT NULL,
  `a_legout` tinyint(1) DEFAULT NULL,
  `faitage` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_388190198A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `hebergement`
--

DROP TABLE IF EXISTS `hebergement`;
CREATE TABLE IF NOT EXISTS `hebergement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `nuit` int NOT NULL,
  `cout_nuit_unitaire` decimal(5,2) NOT NULL,
  `lieu` longtext COLLATE utf8mb4_unicode_ci,
  `date` date NOT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4852DD9CD2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `historique`
--

DROP TABLE IF EXISTS `historique`;
CREATE TABLE IF NOT EXISTS `historique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  `historique` longtext COLLATE utf8mb4_unicode_ci,
  `title` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  PRIMARY KEY (`id`),
  KEY `IDX_EDBFD5ECE7A1254A` (`contact_id`),
  KEY `IDX_EDBFD5ECA4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `identification`
--

DROP TABLE IF EXISTS `identification`;
CREATE TABLE IF NOT EXISTS `identification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `identification` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `identification`
--

INSERT INTO `identification` (`id`, `identification`) VALUES
(1, 'Foncier'),
(2, 'Immeuble'),
(3, 'Foncier + Immeuble'),
(4, 'Infrastructure'),
(5, 'Autre');

-- --------------------------------------------------------

--
-- Structure de la table `identification_proprietaire`
--

DROP TABLE IF EXISTS `identification_proprietaire`;
CREATE TABLE IF NOT EXISTS `identification_proprietaire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `remarques` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_D0441E248A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `identification_proprietaire_contact`
--

DROP TABLE IF EXISTS `identification_proprietaire_contact`;
CREATE TABLE IF NOT EXISTS `identification_proprietaire_contact` (
  `identification_proprietaire_id` int NOT NULL,
  `contact_id` int NOT NULL,
  PRIMARY KEY (`identification_proprietaire_id`,`contact_id`),
  KEY `IDX_6FCBBB59FCF5918A` (`identification_proprietaire_id`),
  KEY `IDX_6FCBBB59E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `implantation_domaine_public`
--

DROP TABLE IF EXISTS `implantation_domaine_public`;
CREATE TABLE IF NOT EXISTS `implantation_domaine_public` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `implantation_limite` tinyint(1) DEFAULT NULL,
  `implantation_retrait` tinyint(1) DEFAULT NULL,
  `recul_min` decimal(10,0) DEFAULT NULL,
  `exeptions` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_33D1D9DD8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `implantation_lim_separatives`
--

DROP TABLE IF EXISTS `implantation_lim_separatives`;
CREATE TABLE IF NOT EXISTS `implantation_lim_separatives` (
  `id` int NOT NULL AUTO_INCREMENT,
  `implantation_limite` tinyint(1) DEFAULT NULL,
  `implantation_retrait` tinyint(1) DEFAULT NULL,
  `recul` decimal(10,0) DEFAULT NULL,
  `exeption` longtext COLLATE utf8mb4_unicode_ci,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7D2373268A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `implantation_propriete`
--

DROP TABLE IF EXISTS `implantation_propriete`;
CREATE TABLE IF NOT EXISTS `implantation_propriete` (
  `id` int NOT NULL AUTO_INCREMENT,
  `non_reg` tinyint(1) DEFAULT NULL,
  `reglemente` tinyint(1) DEFAULT NULL,
  `precisez` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `intervenant`
--

DROP TABLE IF EXISTS `intervenant`;
CREATE TABLE IF NOT EXISTS `intervenant` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `statut_id` int NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `cout` decimal(10,2) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `realisations` longtext COLLATE utf8mb4_unicode_ci,
  `duree` time DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_73D0145CD2235D39` (`tache_id`),
  KEY `IDX_73D0145CF6203804` (`statut_id`),
  KEY `IDX_73D0145CA4AEAFEA` (`entreprise_id`),
  KEY `IDX_73D0145CE7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `liste_annexes_consulte`
--

DROP TABLE IF EXISTS `liste_annexes_consulte`;
CREATE TABLE IF NOT EXISTS `liste_annexes_consulte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `doc_local_urbanisme_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B36D206EFD83624` (`doc_local_urbanisme_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `mail`
--

DROP TABLE IF EXISTS `mail`;
CREATE TABLE IF NOT EXISTS `mail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `contact_id` int NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `objet` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  `created_at` datetime DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)',
  PRIMARY KEY (`id`),
  KEY `IDX_5126AC48F6203804` (`statut_id`),
  KEY `IDX_5126AC48E7A1254A` (`contact_id`),
  KEY `IDX_5126AC48A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `messenger_messages`
--

DROP TABLE IF EXISTS `messenger_messages`;
CREATE TABLE IF NOT EXISTS `messenger_messages` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `body` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `headers` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue_name` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `available_at` datetime NOT NULL,
  `delivered_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_75EA56E0FB7336F0` (`queue_name`),
  KEY `IDX_75EA56E0E3BD61CE` (`available_at`),
  KEY `IDX_75EA56E016BA31DB` (`delivered_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `moyen`
--

DROP TABLE IF EXISTS `moyen`;
CREATE TABLE IF NOT EXISTS `moyen` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2D6523D6D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `note`
--

DROP TABLE IF EXISTS `note`;
CREATE TABLE IF NOT EXISTS `note` (
  `id` int NOT NULL AUTO_INCREMENT,
  `contact_id` int DEFAULT NULL,
  `entreprise_id` int DEFAULT NULL,
  `note` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_CFBDFA14E7A1254A` (`contact_id`),
  KEY `IDX_CFBDFA14A4AEAFEA` (`entreprise_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `occupation_terrain`
--

DROP TABLE IF EXISTS `occupation_terrain`;
CREATE TABLE IF NOT EXISTS `occupation_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `terrain_bati` tinyint(1) DEFAULT NULL,
  `nombre_nature_const` longtext COLLATE utf8mb4_unicode_ci,
  `construction_plan_cadastrale` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_2B0C386B8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `ouverture_dossier`
--

DROP TABLE IF EXISTS `ouverture_dossier`;
CREATE TABLE IF NOT EXISTS `ouverture_dossier` (
  `id` int NOT NULL AUTO_INCREMENT,
  `devis_id` int NOT NULL,
  `quantite` int NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4F94D6EB41DEFADA` (`devis_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `pente5`
--

DROP TABLE IF EXISTS `pente5`;
CREATE TABLE IF NOT EXISTS `pente5` (
  `id` int NOT NULL AUTO_INCREMENT,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sait_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2D0A4F228A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `pieces_jointes_relief`
--

DROP TABLE IF EXISTS `pieces_jointes_relief`;
CREATE TABLE IF NOT EXISTS `pieces_jointes_relief` (
  `id` int NOT NULL AUTO_INCREMENT,
  `plan_topographique` tinyint(1) DEFAULT NULL,
  `releve_almetrique` tinyint(1) DEFAULT NULL,
  `carte_ign` tinyint(1) DEFAULT NULL,
  `plan_cadastre` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_E7FD3E38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `piece_consulte`
--

DROP TABLE IF EXISTS `piece_consulte`;
CREATE TABLE IF NOT EXISTS `piece_consulte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_id` int DEFAULT NULL,
  `doc_local_urbanisme_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_95E19428C54C8C93` (`type_id`),
  KEY `IDX_95E19428FD83624` (`doc_local_urbanisme_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `piece_jointe_serv_prive`
--

DROP TABLE IF EXISTS `piece_jointe_serv_prive`;
CREATE TABLE IF NOT EXISTS `piece_jointe_serv_prive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `etat_des_servitudes` tinyint(1) DEFAULT NULL,
  `plan_serv_existantes` tinyint(1) DEFAULT NULL,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_C9E547708A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `plan_cadastre`
--

DROP TABLE IF EXISTS `plan_cadastre`;
CREATE TABLE IF NOT EXISTS `plan_cadastre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_25765AF68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `probleme`
--

DROP TABLE IF EXISTS `probleme`;
CREATE TABLE IF NOT EXISTS `probleme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `classe_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7AB2D714F6203804` (`statut_id`),
  KEY `IDX_7AB2D7148F5EA509` (`classe_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `profession`
--

DROP TABLE IF EXISTS `profession`;
CREATE TABLE IF NOT EXISTS `profession` (
  `id` int NOT NULL AUTO_INCREMENT,
  `entreprise_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `profession` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `poste` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_BA930D69A4AEAFEA` (`entreprise_id`),
  KEY `IDX_BA930D69E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `projet`
--

DROP TABLE IF EXISTS `projet`;
CREATE TABLE IF NOT EXISTS `projet` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_50159CA9C54C8C93` (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `projet_terrain`
--

DROP TABLE IF EXISTS `projet_terrain`;
CREATE TABLE IF NOT EXISTS `projet_terrain` (
  `projet_id` int NOT NULL,
  `terrain_id` int NOT NULL,
  PRIMARY KEY (`projet_id`,`terrain_id`),
  KEY `IDX_4A5C0EC0C18272` (`projet_id`),
  KEY `IDX_4A5C0EC08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_evacuation_eaux_usees`
--

DROP TABLE IF EXISTS `raccordement_evacuation_eaux_usees`;
CREATE TABLE IF NOT EXISTS `raccordement_evacuation_eaux_usees` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `raccordement_evacuation_eaux_usees`
--

INSERT INTO `raccordement_evacuation_eaux_usees` (`id`, `name`, `distance`) VALUES
(1, 'Oui', NULL),
(2, 'Non', NULL),
(3, 'Ne sais pas', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_reseaux_eau`
--

DROP TABLE IF EXISTS `raccordement_reseaux_eau`;
CREATE TABLE IF NOT EXISTS `raccordement_reseaux_eau` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `raccordement_reseaux_eau`
--

INSERT INTO `raccordement_reseaux_eau` (`id`, `statut`, `distance`) VALUES
(1, 'Oui', NULL),
(2, 'Non', NULL),
(3, 'Ne sais pas', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_reseau_electrique`
--

DROP TABLE IF EXISTS `raccordement_reseau_electrique`;
CREATE TABLE IF NOT EXISTS `raccordement_reseau_electrique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `raccordement_reseau_electrique`
--

INSERT INTO `raccordement_reseau_electrique` (`id`, `name`) VALUES
(1, 'Oui'),
(2, 'Non'),
(3, 'Ne sait pas');

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_reseau_gaz`
--

DROP TABLE IF EXISTS `raccordement_reseau_gaz`;
CREATE TABLE IF NOT EXISTS `raccordement_reseau_gaz` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `distance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `raccordement_reseau_gaz`
--

INSERT INTO `raccordement_reseau_gaz` (`id`, `statut`, `distance`) VALUES
(1, 'Oui', NULL),
(2, 'Non', NULL),
(3, 'Ne sais pas', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `raccordement_tel`
--

DROP TABLE IF EXISTS `raccordement_tel`;
CREATE TABLE IF NOT EXISTS `raccordement_tel` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `raccordement_tel`
--

INSERT INTO `raccordement_tel` (`id`, `statut`) VALUES
(1, 'Oui'),
(2, 'Non'),
(3, 'Ne sais pas');

-- --------------------------------------------------------

--
-- Structure de la table `reference_cadastrale`
--

DROP TABLE IF EXISTS `reference_cadastrale`;
CREATE TABLE IF NOT EXISTS `reference_cadastrale` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `prefixe` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `section` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `numero` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_426BDFA18A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reglement_zone_joint`
--

DROP TABLE IF EXISTS `reglement_zone_joint`;
CREATE TABLE IF NOT EXISTS `reglement_zone_joint` (
  `id` int NOT NULL AUTO_INCREMENT,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_AADF24BE8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `relief_terrain`
--

DROP TABLE IF EXISTS `relief_terrain`;
CREATE TABLE IF NOT EXISTS `relief_terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `terrain_en_pente` tinyint(1) DEFAULT NULL,
  `pente_reguliere` tinyint(1) DEFAULT NULL,
  `plateau` tinyint(1) DEFAULT NULL,
  `talus` tinyint(1) DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_E0CB4E98A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rendez_vous_architecte`
--

DROP TABLE IF EXISTS `rendez_vous_architecte`;
CREATE TABLE IF NOT EXISTS `rendez_vous_architecte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_D0F7B5898A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rendez_vous_urbanisme`
--

DROP TABLE IF EXISTS `rendez_vous_urbanisme`;
CREATE TABLE IF NOT EXISTS `rendez_vous_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `motif` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_1456C64B8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reseaux`
--

DROP TABLE IF EXISTS `reseaux`;
CREATE TABLE IF NOT EXISTS `reseaux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `viabilisé_id` int DEFAULT NULL,
  `raccord_eau_id` int DEFAULT NULL,
  `raccordement_evacuation_eaux_usees_id` int DEFAULT NULL,
  `raccordement_reseau_electrique_id` int DEFAULT NULL,
  `raccordement_reseau_gaz_id` int DEFAULT NULL,
  `raccordement_tel_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_49ABC8118A2D8B41` (`terrain_id`),
  KEY `IDX_49ABC81171C0203` (`viabilisé_id`),
  KEY `IDX_49ABC811D92A4C1C` (`raccord_eau_id`),
  KEY `IDX_49ABC811C07F7BC1` (`raccordement_evacuation_eaux_usees_id`),
  KEY `IDX_49ABC811F589C4D2` (`raccordement_reseau_electrique_id`),
  KEY `IDX_49ABC8117914E3F8` (`raccordement_reseau_gaz_id`),
  KEY `IDX_49ABC8116128D4DA` (`raccordement_tel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `restauration`
--

DROP TABLE IF EXISTS `restauration`;
CREATE TABLE IF NOT EXISTS `restauration` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int DEFAULT NULL,
  `cout_repas_personnel` decimal(10,0) DEFAULT NULL,
  `cout_repas_clients` decimal(10,2) DEFAULT NULL,
  `duree` time DEFAULT NULL,
  `forfait` decimal(10,2) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `etablissement` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_898B1EF1D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `reunion`
--

DROP TABLE IF EXISTS `reunion`;
CREATE TABLE IF NOT EXISTS `reunion` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tache_id` int NOT NULL,
  `objet` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` date DEFAULT NULL,
  `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cout_location_salle` decimal(10,2) DEFAULT NULL,
  `cout_location_materiel` decimal(10,2) DEFAULT NULL,
  `cout_restauration` decimal(10,2) DEFAULT NULL,
  `cout_collation` decimal(10,2) DEFAULT NULL,
  `duree` time DEFAULT NULL,
  `forfait_horaire` decimal(10,2) DEFAULT NULL,
  `payer` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_5B00A482D2235D39` (`tache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_pieces_jointe`
--

DROP TABLE IF EXISTS `servitude_pieces_jointe`;
CREATE TABLE IF NOT EXISTS `servitude_pieces_jointe` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `servitude_publique` tinyint(1) DEFAULT NULL,
  `emplacement_reserve` tinyint(1) DEFAULT NULL,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_B3E089AB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_prive`
--

DROP TABLE IF EXISTS `servitude_prive`;
CREATE TABLE IF NOT EXISTS `servitude_prive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_FCF4F0998A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_prive_creer`
--

DROP TABLE IF EXISTS `servitude_prive_creer`;
CREATE TABLE IF NOT EXISTS `servitude_prive_creer` (
  `id` int NOT NULL AUTO_INCREMENT,
  `oui` tinyint(1) DEFAULT NULL,
  `oui_content` longtext COLLATE utf8mb4_unicode_ci,
  `non` tinyint(1) DEFAULT NULL,
  `ne_sais_pas` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_7CA4E4A08A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_publique`
--

DROP TABLE IF EXISTS `servitude_publique`;
CREATE TABLE IF NOT EXISTS `servitude_publique` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `alignement` tinyint(1) DEFAULT NULL,
  `servitude_eau_gaz` tinyint(1) DEFAULT NULL,
  `servitude_degagement` tinyint(1) DEFAULT NULL,
  `servitude_monument_historique` tinyint(1) DEFAULT NULL,
  `servitude_marche_pied` tinyint(1) DEFAULT NULL,
  `autre` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_56AA69FC8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `servitude_urbanisme`
--

DROP TABLE IF EXISTS `servitude_urbanisme`;
CREATE TABLE IF NOT EXISTS `servitude_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `marge_de_recul` tinyint(1) DEFAULT NULL,
  `recul_content` longtext COLLATE utf8mb4_unicode_ci,
  `emplacement_reserve` tinyint(1) DEFAULT NULL,
  `emplacement_content` longtext COLLATE utf8mb4_unicode_ci,
  `autre` tinyint(1) DEFAULT NULL,
  `autre_content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_4C9264568A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `sta2_roues`
--

DROP TABLE IF EXISTS `sta2_roues`;
CREATE TABLE IF NOT EXISTS `sta2_roues` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_EE352B6D8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_adresse`
--

DROP TABLE IF EXISTS `statut_adresse`;
CREATE TABLE IF NOT EXISTS `statut_adresse` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_adresse`
--

INSERT INTO `statut_adresse` (`id`, `statut`) VALUES
(1, 'Bureau'),
(2, 'Domicile'),
(3, 'Autre');

-- --------------------------------------------------------

--
-- Structure de la table `statut_communication`
--

DROP TABLE IF EXISTS `statut_communication`;
CREATE TABLE IF NOT EXISTS `statut_communication` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_communication`
--

INSERT INTO `statut_communication` (`id`, `statut`) VALUES
(1, 'Téléphone'),
(2, 'Mail'),
(3, 'Courrier');

-- --------------------------------------------------------

--
-- Structure de la table `statut_contact`
--

DROP TABLE IF EXISTS `statut_contact`;
CREATE TABLE IF NOT EXISTS `statut_contact` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_contact`
--

INSERT INTO `statut_contact` (`id`, `statut`) VALUES
(9, 'Mandant'),
(10, 'Intervenant'),
(11, 'Prescripteur'),
(12, 'Contact'),
(13, 'Prospect'),
(14, 'Usufruitier'),
(15, 'Proprietaire'),
(16, '...');

-- --------------------------------------------------------

--
-- Structure de la table `statut_deplacement`
--

DROP TABLE IF EXISTS `statut_deplacement`;
CREATE TABLE IF NOT EXISTS `statut_deplacement` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_deplacement`
--

INSERT INTO `statut_deplacement` (`id`, `statut`) VALUES
(1, 'Voiture perso'),
(2, 'Taxi'),
(3, 'Train'),
(4, 'Tram'),
(5, 'Métro'),
(6, 'Avion');

-- --------------------------------------------------------

--
-- Structure de la table `statut_entreprise`
--

DROP TABLE IF EXISTS `statut_entreprise`;
CREATE TABLE IF NOT EXISTS `statut_entreprise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `statut_etat_des_lieux`
--

DROP TABLE IF EXISTS `statut_etat_des_lieux`;
CREATE TABLE IF NOT EXISTS `statut_etat_des_lieux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_etat_des_lieux`
--

INSERT INTO `statut_etat_des_lieux` (`id`, `statut`) VALUES
(1, 'Borne'),
(2, 'Electricité'),
(3, 'Eau potable'),
(4, 'Servitudes de passage'),
(5, 'Servitudes de reseaux'),
(6, 'Nuissances sonores'),
(7, 'Nuissances olfactives'),
(8, 'Clôtures'),
(9, 'composition et état des bâtiments'),
(10, 'composition et état des bâtiments'),
(11, 'accès et praticabilité'),
(12, 'Inondations'),
(13, 'problèmes de voisinage'),
(14, 'couloir aérien'),
(15, 'emplacement réservé'),
(16, 'projet à proximité'),
(17, 'risque incendie'),
(18, 'abf'),
(19, 'diagnostic archéologique'),
(20, 'contact des voisins'),
(21, 'contacts adm'),
(22, 'stationnement et parking nb'),
(23, 'Histoire du secteur et du site'),
(24, 'indices de valorisation du site'),
(25, 'autres');

-- --------------------------------------------------------

--
-- Structure de la table `statut_intervenant`
--

DROP TABLE IF EXISTS `statut_intervenant`;
CREATE TABLE IF NOT EXISTS `statut_intervenant` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_intervenant`
--

INSERT INTO `statut_intervenant` (`id`, `statut`) VALUES
(1, 'Client'),
(2, 'Mandant'),
(3, 'Intervenant'),
(4, 'Prescripteur'),
(5, 'Contact'),
(6, 'Prospect'),
(7, 'Autre');

-- --------------------------------------------------------

--
-- Structure de la table `statut_mail`
--

DROP TABLE IF EXISTS `statut_mail`;
CREATE TABLE IF NOT EXISTS `statut_mail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_mail`
--

INSERT INTO `statut_mail` (`id`, `statut`) VALUES
(1, 'Personnel'),
(2, 'Personnel'),
(3, 'Autre');

-- --------------------------------------------------------

--
-- Structure de la table `statut_probleme`
--

DROP TABLE IF EXISTS `statut_probleme`;
CREATE TABLE IF NOT EXISTS `statut_probleme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_probleme`
--

INSERT INTO `statut_probleme` (`id`, `statut`) VALUES
(1, 'Juridique'),
(2, 'Technique'),
(3, 'Commercial');

-- --------------------------------------------------------

--
-- Structure de la table `statut_tache`
--

DROP TABLE IF EXISTS `statut_tache`;
CREATE TABLE IF NOT EXISTS `statut_tache` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_tache`
--

INSERT INTO `statut_tache` (`id`, `name`) VALUES
(1, 'A faire'),
(2, 'En cours'),
(3, 'ok');

-- --------------------------------------------------------

--
-- Structure de la table `statut_telephone`
--

DROP TABLE IF EXISTS `statut_telephone`;
CREATE TABLE IF NOT EXISTS `statut_telephone` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `statut_telephone`
--

INSERT INTO `statut_telephone` (`id`, `statut`) VALUES
(1, 'Bureau'),
(2, 'Domicile'),
(3, 'Portable');

-- --------------------------------------------------------

--
-- Structure de la table `sta_automobile`
--

DROP TABLE IF EXISTS `sta_automobile`;
CREATE TABLE IF NOT EXISTS `sta_automobile` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_390D383F8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `tache`
--

DROP TABLE IF EXISTS `tache`;
CREATE TABLE IF NOT EXISTS `tache` (
  `id` int NOT NULL AUTO_INCREMENT,
  `probleme_id` int NOT NULL,
  `statut_id` int NOT NULL,
  `owner_id` int DEFAULT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_9387207596784F9E` (`probleme_id`),
  KEY `IDX_93872075F6203804` (`statut_id`),
  KEY `IDX_938720757E3C61F9` (`owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `telephone`
--

DROP TABLE IF EXISTS `telephone`;
CREATE TABLE IF NOT EXISTS `telephone` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut_id` int NOT NULL,
  `entreprise_id` int DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_450FF010F6203804` (`statut_id`),
  KEY `IDX_450FF010A4AEAFEA` (`entreprise_id`),
  KEY `IDX_450FF010E7A1254A` (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `terrain`
--

DROP TABLE IF EXISTS `terrain`;
CREATE TABLE IF NOT EXISTS `terrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `commune` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code_postal` int DEFAULT NULL,
  `adress` longtext COLLATE utf8mb4_unicode_ci,
  `name` varchar(300) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remarques` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `terrain_reg_const`
--

DROP TABLE IF EXISTS `terrain_reg_const`;
CREATE TABLE IF NOT EXISTS `terrain_reg_const` (
  `id` int NOT NULL AUTO_INCREMENT,
  `oui` tinyint(1) DEFAULT NULL,
  `non` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4DC07FCB8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `terrain_viabilise`
--

DROP TABLE IF EXISTS `terrain_viabilise`;
CREATE TABLE IF NOT EXISTS `terrain_viabilise` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `terrain_viabilise`
--

INSERT INTO `terrain_viabilise` (`id`, `statut`) VALUES
(1, 'Oui'),
(2, 'Non'),
(3, 'Ne sais pas');

-- --------------------------------------------------------

--
-- Structure de la table `trace_deau`
--

DROP TABLE IF EXISTS `trace_deau`;
CREATE TABLE IF NOT EXISTS `trace_deau` (
  `id` int NOT NULL AUTO_INCREMENT,
  `eau_terrain_id` int DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `metre` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_20C920A334A8A769` (`eau_terrain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `trace_deau`
--

INSERT INTO `trace_deau` (`id`, `eau_terrain_id`, `name`, `metre`) VALUES
(1, NULL, 'Sol Humide', NULL),
(2, NULL, 'Différence de végétalisation entre point haut et\r\n        point bas', NULL),
(3, NULL, 'Puit', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `type`
--

DROP TABLE IF EXISTS `type`;
CREATE TABLE IF NOT EXISTS `type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type`
--

INSERT INTO `type` (`id`, `name`) VALUES
(1, 'oui'),
(2, 'non'),
(3, 'Ne sais pas');

-- --------------------------------------------------------

--
-- Structure de la table `type_doc_urbanisme`
--

DROP TABLE IF EXISTS `type_doc_urbanisme`;
CREATE TABLE IF NOT EXISTS `type_doc_urbanisme` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_doc_urbanisme`
--

INSERT INTO `type_doc_urbanisme` (`id`, `statut`) VALUES
(1, 'Plan d\'Occupation des sols (POS)'),
(2, 'Plan Local d\'ubanisme (PLU)'),
(3, 'Plan Local d\'ubanisme Intercommunal (PLUI)'),
(4, 'Carte Communale'),
(5, 'Reglement National d\'Urbanisme (RNU)');

-- --------------------------------------------------------

--
-- Structure de la table `type_piece_consulte`
--

DROP TABLE IF EXISTS `type_piece_consulte`;
CREATE TABLE IF NOT EXISTS `type_piece_consulte` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_piece_consulte`
--

INSERT INTO `type_piece_consulte` (`id`, `name`) VALUES
(1, 'Rapport de présentation'),
(2, 'PADD'),
(3, 'OAP'),
(4, 'Plan de zonage'),
(5, 'reglement écrit');

-- --------------------------------------------------------

--
-- Structure de la table `type_projet`
--

DROP TABLE IF EXISTS `type_projet`;
CREATE TABLE IF NOT EXISTS `type_projet` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_projet`
--

INSERT INTO `type_projet` (`id`, `type`) VALUES
(1, 'Foncier Seul'),
(2, 'Immeuble Seul'),
(3, 'Foncier + Immeuble'),
(4, 'Foncier Seul'),
(5, 'Immeuble Seul'),
(6, 'Foncier + Immeuble');

-- --------------------------------------------------------

--
-- Structure de la table `type_proprietaire`
--

DROP TABLE IF EXISTS `type_proprietaire`;
CREATE TABLE IF NOT EXISTS `type_proprietaire` (
  `id` int NOT NULL AUTO_INCREMENT,
  `prop_unique` tinyint(1) DEFAULT NULL,
  `indivision_copropriete` tinyint(1) DEFAULT NULL,
  `societe` tinyint(1) DEFAULT NULL,
  `personne_publique` tinyint(1) DEFAULT NULL,
  `terrain_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_EEA023D38A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `type_voie_acces`
--

DROP TABLE IF EXISTS `type_voie_acces`;
CREATE TABLE IF NOT EXISTS `type_voie_acces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `type_voie_acces`
--

INSERT INTO `type_voie_acces` (`id`, `name`) VALUES
(1, 'Route Nationale'),
(2, 'Route Départementale'),
(3, 'Voie Communale'),
(4, 'Voie Privée'),
(5, 'Chemin rural'),
(6, 'Servitude de passage');

-- --------------------------------------------------------

--
-- Structure de la table `user`
--

DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(180) COLLATE utf8mb4_unicode_ci NOT NULL,
  `roles` json NOT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reset_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_8D93D649E7927C74` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `user`
--

INSERT INTO `user` (`id`, `email`, `roles`, `password`, `nom`, `prenom`, `reset_token`) VALUES
(1, 'tom@tom.fr', '[\"ROLE_USER\"]', '$2y$13$rFXpDaf6Ke/jvJ9dgReEjugh1CFArVjRSe/VnWI2Dzs/nKz1U9LFW', 'Tom', 'Tom', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `vegetation`
--

DROP TABLE IF EXISTS `vegetation`;
CREATE TABLE IF NOT EXISTS `vegetation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `densite_id` int DEFAULT NULL,
  `observation` longtext COLLATE utf8mb4_unicode_ci,
  `grand_arbres` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_D25C7EDB8A2D8B41` (`terrain_id`),
  KEY `IDX_D25C7EDB83C27326` (`densite_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `verif_cadastre`
--

DROP TABLE IF EXISTS `verif_cadastre`;
CREATE TABLE IF NOT EXISTS `verif_cadastre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `oui` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C0117DA8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_acces`
--

DROP TABLE IF EXISTS `zone_acces`;
CREATE TABLE IF NOT EXISTS `zone_acces` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_76DA94B68A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_cara_cterrain`
--

DROP TABLE IF EXISTS `zone_cara_cterrain`;
CREATE TABLE IF NOT EXISTS `zone_cara_cterrain` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `reglemente` tinyint(1) DEFAULT NULL,
  `non_reglemente` tinyint(1) DEFAULT NULL,
  `distance` decimal(10,0) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_2E44B2C58A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_cond_part`
--

DROP TABLE IF EXISTS `zone_cond_part`;
CREATE TABLE IF NOT EXISTS `zone_cond_part` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_9E5EC5998A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_oblig_mixite_sociale`
--

DROP TABLE IF EXISTS `zone_oblig_mixite_sociale`;
CREATE TABLE IF NOT EXISTS `zone_oblig_mixite_sociale` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `pourcentage` decimal(10,0) DEFAULT NULL,
  `anwser_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_49037A588A2D8B41` (`terrain_id`),
  KEY `IDX_49037A58C5ED2E02` (`anwser_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_occ_util_int`
--

DROP TABLE IF EXISTS `zone_occ_util_int`;
CREATE TABLE IF NOT EXISTS `zone_occ_util_int` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_520ED56D8A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `zone_reseaux`
--

DROP TABLE IF EXISTS `zone_reseaux`;
CREATE TABLE IF NOT EXISTS `zone_reseaux` (
  `id` int NOT NULL AUTO_INCREMENT,
  `terrain_id` int DEFAULT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `IDX_F79FCB298A2D8B41` (`terrain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Contraintes pour les tables déchargées
--

--
-- Contraintes pour la table `access`
--
ALTER TABLE `access`
  ADD CONSTRAINT `FK_6692B548A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_6692B54C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_voie_acces` (`id`);

--
-- Contraintes pour la table `accompte`
--
ALTER TABLE `accompte`
  ADD CONSTRAINT `FK_BD09DAF741DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `act_int_notaire`
--
ALTER TABLE `act_int_notaire`
  ADD CONSTRAINT `FK_E7C229EE8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_int_proprio`
--
ALTER TABLE `act_int_proprio`
  ADD CONSTRAINT `FK_C96E27448A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_int_voisin`
--
ALTER TABLE `act_int_voisin`
  ADD CONSTRAINT `FK_333BBDA88A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_rdv_hypotheque`
--
ALTER TABLE `act_rdv_hypotheque`
  ADD CONSTRAINT `FK_3BF55D6E8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `act_rendez_vserv_urb`
--
ALTER TABLE `act_rendez_vserv_urb`
  ADD CONSTRAINT `FK_B058530C8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `adresse`
--
ALTER TABLE `adresse`
  ADD CONSTRAINT `FK_C35F0816A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_C35F0816E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_C35F0816F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_adresse` (`id`);

--
-- Contraintes pour la table `appels_recus`
--
ALTER TABLE `appels_recus`
  ADD CONSTRAINT `FK_2F9E5C3AE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `aspect_exterieur`
--
ALTER TABLE `aspect_exterieur`
  ADD CONSTRAINT `FK_8214C4838A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `caract_gene_zone`
--
ALTER TABLE `caract_gene_zone`
  ADD CONSTRAINT `FK_9EEE76B68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `ces`
--
ALTER TABLE `ces`
  ADD CONSTRAINT `FK_6456130F8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `classement_terrain`
--
ALTER TABLE `classement_terrain`
  ADD CONSTRAINT `FK_A5722A138A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `commande_bornage`
--
ALTER TABLE `commande_bornage`
  ADD CONSTRAINT `FK_88C6B7A28A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `communication`
--
ALTER TABLE `communication`
  ADD CONSTRAINT `FK_F9AFB5EBD2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_F9AFB5EBF6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_communication` (`id`);

--
-- Contraintes pour la table `concl_remarque`
--
ALTER TABLE `concl_remarque`
  ADD CONSTRAINT `FK_BAB73CEA8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `concl_risque`
--
ALTER TABLE `concl_risque`
  ADD CONSTRAINT `FK_8ECD13E68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `concl_servitude_prive`
--
ALTER TABLE `concl_servitude_prive`
  ADD CONSTRAINT `FK_737D559A8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `concl_servitude_publique`
--
ALTER TABLE `concl_servitude_publique`
  ADD CONSTRAINT `FK_13F8A4028A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `contact`
--
ALTER TABLE `contact`
  ADD CONSTRAINT `FK_4C62E638F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_contact` (`id`);

--
-- Contraintes pour la table `contenance_bornage`
--
ALTER TABLE `contenance_bornage`
  ADD CONSTRAINT `FK_44DF503A8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `contenance_cadastrale`
--
ALTER TABLE `contenance_cadastrale`
  ADD CONSTRAINT `FK_8E3E2678A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `demenbrement_prop`
--
ALTER TABLE `demenbrement_prop`
  ADD CONSTRAINT `FK_D7DCF5968A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `deplacement`
--
ALTER TABLE `deplacement`
  ADD CONSTRAINT `FK_1296FAC2D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_1296FAC2F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_deplacement` (`id`);

--
-- Contraintes pour la table `devis_deplacement`
--
ALTER TABLE `devis_deplacement`
  ADD CONSTRAINT `FK_BCF731C341DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_hebergement`
--
ALTER TABLE `devis_hebergement`
  ADD CONSTRAINT `FK_E633169D41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_prestation`
--
ALTER TABLE `devis_prestation`
  ADD CONSTRAINT `FK_E169C44541DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_restauration`
--
ALTER TABLE `devis_restauration`
  ADD CONSTRAINT `FK_FE224FAC41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `devis_reunion`
--
ALTER TABLE `devis_reunion`
  ADD CONSTRAINT `FK_C9EE3FDE41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `document`
--
ALTER TABLE `document`
  ADD CONSTRAINT `FK_D8698A76D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `doc_local_urbanisme`
--
ALTER TABLE `doc_local_urbanisme`
  ADD CONSTRAINT `FK_B0D9BF9D8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_B0D9BF9DC54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_doc_urbanisme` (`id`);

--
-- Contraintes pour la table `eau_terrain`
--
ALTER TABLE `eau_terrain`
  ADD CONSTRAINT `FK_17090FE78A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `entreprise`
--
ALTER TABLE `entreprise`
  ADD CONSTRAINT `FK_D19FA60F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_entreprise` (`id`);

--
-- Contraintes pour la table `environement`
--
ALTER TABLE `environement`
  ADD CONSTRAINT `FK_19F04B86173F91FD` FOREIGN KEY (`env_de_type_id`) REFERENCES `env_de_type` (`id`),
  ADD CONSTRAINT `FK_19F04B862F35B472` FOREIGN KEY (`env_perimetre_id`) REFERENCES `env_perimetre` (`id`),
  ADD CONSTRAINT `FK_19F04B8642F9133D` FOREIGN KEY (`bati_environant_id`) REFERENCES `bati_environant` (`id`),
  ADD CONSTRAINT `FK_19F04B86503E9859` FOREIGN KEY (`env_reseaux_transport_id`) REFERENCES `env_reseaux_transport` (`id`),
  ADD CONSTRAINT `FK_19F04B86950E4556` FOREIGN KEY (`env_equipement_public_id`) REFERENCES `env_equipement_public` (`id`),
  ADD CONSTRAINT `FK_19F04B86ACDD68CD` FOREIGN KEY (`env_com_serv_id`) REFERENCES `env_com_serv` (`id`),
  ADD CONSTRAINT `FK_19F04B86F932F33C` FOREIGN KEY (`env_nuisances_sonores_id`) REFERENCES `env_nuisances_sonores` (`id`);

--
-- Contraintes pour la table `espace_libre`
--
ALTER TABLE `espace_libre`
  ADD CONSTRAINT `FK_1AE934EA8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `etat_des_lieux`
--
ALTER TABLE `etat_des_lieux`
  ADD CONSTRAINT `FK_F7210312F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_etat_des_lieux` (`id`);

--
-- Contraintes pour la table `forfait`
--
ALTER TABLE `forfait`
  ADD CONSTRAINT `FK_BBB5C482D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `haut_max_const`
--
ALTER TABLE `haut_max_const`
  ADD CONSTRAINT `FK_388190198A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `hebergement`
--
ALTER TABLE `hebergement`
  ADD CONSTRAINT `FK_4852DD9CD2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `historique`
--
ALTER TABLE `historique`
  ADD CONSTRAINT `FK_EDBFD5ECA4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_EDBFD5ECE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `identification_proprietaire`
--
ALTER TABLE `identification_proprietaire`
  ADD CONSTRAINT `FK_D0441E248A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `identification_proprietaire_contact`
--
ALTER TABLE `identification_proprietaire_contact`
  ADD CONSTRAINT `FK_6FCBBB59E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_6FCBBB59FCF5918A` FOREIGN KEY (`identification_proprietaire_id`) REFERENCES `identification_proprietaire` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `implantation_domaine_public`
--
ALTER TABLE `implantation_domaine_public`
  ADD CONSTRAINT `FK_33D1D9DD8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `implantation_lim_separatives`
--
ALTER TABLE `implantation_lim_separatives`
  ADD CONSTRAINT `FK_7D2373268A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `intervenant`
--
ALTER TABLE `intervenant`
  ADD CONSTRAINT `FK_73D0145CA4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_73D0145CD2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`),
  ADD CONSTRAINT `FK_73D0145CE7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_73D0145CF6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_intervenant` (`id`);

--
-- Contraintes pour la table `liste_annexes_consulte`
--
ALTER TABLE `liste_annexes_consulte`
  ADD CONSTRAINT `FK_B36D206EFD83624` FOREIGN KEY (`doc_local_urbanisme_id`) REFERENCES `doc_local_urbanisme` (`id`);

--
-- Contraintes pour la table `mail`
--
ALTER TABLE `mail`
  ADD CONSTRAINT `FK_5126AC48A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_5126AC48E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_5126AC48F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_mail` (`id`);

--
-- Contraintes pour la table `moyen`
--
ALTER TABLE `moyen`
  ADD CONSTRAINT `FK_2D6523D6D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `note`
--
ALTER TABLE `note`
  ADD CONSTRAINT `FK_CFBDFA14A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_CFBDFA14E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `occupation_terrain`
--
ALTER TABLE `occupation_terrain`
  ADD CONSTRAINT `FK_2B0C386B8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `ouverture_dossier`
--
ALTER TABLE `ouverture_dossier`
  ADD CONSTRAINT `FK_4F94D6EB41DEFADA` FOREIGN KEY (`devis_id`) REFERENCES `devis` (`id`);

--
-- Contraintes pour la table `pente5`
--
ALTER TABLE `pente5`
  ADD CONSTRAINT `FK_2D0A4F228A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `pieces_jointes_relief`
--
ALTER TABLE `pieces_jointes_relief`
  ADD CONSTRAINT `FK_E7FD3E38A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `piece_consulte`
--
ALTER TABLE `piece_consulte`
  ADD CONSTRAINT `FK_95E19428C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_piece_consulte` (`id`),
  ADD CONSTRAINT `FK_95E19428FD83624` FOREIGN KEY (`doc_local_urbanisme_id`) REFERENCES `doc_local_urbanisme` (`id`);

--
-- Contraintes pour la table `piece_jointe_serv_prive`
--
ALTER TABLE `piece_jointe_serv_prive`
  ADD CONSTRAINT `FK_C9E547708A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `plan_cadastre`
--
ALTER TABLE `plan_cadastre`
  ADD CONSTRAINT `FK_25765AF68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `probleme`
--
ALTER TABLE `probleme`
  ADD CONSTRAINT `FK_7AB2D7148F5EA509` FOREIGN KEY (`classe_id`) REFERENCES `classe` (`id`),
  ADD CONSTRAINT `FK_7AB2D714F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_probleme` (`id`);

--
-- Contraintes pour la table `profession`
--
ALTER TABLE `profession`
  ADD CONSTRAINT `FK_BA930D69A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_BA930D69E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`);

--
-- Contraintes pour la table `projet`
--
ALTER TABLE `projet`
  ADD CONSTRAINT `FK_50159CA9C54C8C93` FOREIGN KEY (`type_id`) REFERENCES `type_projet` (`id`);

--
-- Contraintes pour la table `projet_terrain`
--
ALTER TABLE `projet_terrain`
  ADD CONSTRAINT `FK_4A5C0EC08A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_4A5C0EC0C18272` FOREIGN KEY (`projet_id`) REFERENCES `projet` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `reference_cadastrale`
--
ALTER TABLE `reference_cadastrale`
  ADD CONSTRAINT `FK_426BDFA18A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `reglement_zone_joint`
--
ALTER TABLE `reglement_zone_joint`
  ADD CONSTRAINT `FK_AADF24BE8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `relief_terrain`
--
ALTER TABLE `relief_terrain`
  ADD CONSTRAINT `FK_E0CB4E98A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `rendez_vous_architecte`
--
ALTER TABLE `rendez_vous_architecte`
  ADD CONSTRAINT `FK_D0F7B5898A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `rendez_vous_urbanisme`
--
ALTER TABLE `rendez_vous_urbanisme`
  ADD CONSTRAINT `FK_1456C64B8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `reseaux`
--
ALTER TABLE `reseaux`
  ADD CONSTRAINT `FK_49ABC8116128D4DA` FOREIGN KEY (`raccordement_tel_id`) REFERENCES `raccordement_tel` (`id`),
  ADD CONSTRAINT `FK_49ABC81171C0203` FOREIGN KEY (`viabilisé_id`) REFERENCES `terrain_viabilise` (`id`),
  ADD CONSTRAINT `FK_49ABC8117914E3F8` FOREIGN KEY (`raccordement_reseau_gaz_id`) REFERENCES `raccordement_reseau_gaz` (`id`),
  ADD CONSTRAINT `FK_49ABC8118A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_49ABC811C07F7BC1` FOREIGN KEY (`raccordement_evacuation_eaux_usees_id`) REFERENCES `raccordement_evacuation_eaux_usees` (`id`),
  ADD CONSTRAINT `FK_49ABC811D92A4C1C` FOREIGN KEY (`raccord_eau_id`) REFERENCES `raccordement_reseaux_eau` (`id`),
  ADD CONSTRAINT `FK_49ABC811F589C4D2` FOREIGN KEY (`raccordement_reseau_electrique_id`) REFERENCES `raccordement_reseau_electrique` (`id`);

--
-- Contraintes pour la table `restauration`
--
ALTER TABLE `restauration`
  ADD CONSTRAINT `FK_898B1EF1D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `reunion`
--
ALTER TABLE `reunion`
  ADD CONSTRAINT `FK_5B00A482D2235D39` FOREIGN KEY (`tache_id`) REFERENCES `tache` (`id`);

--
-- Contraintes pour la table `servitude_pieces_jointe`
--
ALTER TABLE `servitude_pieces_jointe`
  ADD CONSTRAINT `FK_B3E089AB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_prive`
--
ALTER TABLE `servitude_prive`
  ADD CONSTRAINT `FK_FCF4F0998A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_prive_creer`
--
ALTER TABLE `servitude_prive_creer`
  ADD CONSTRAINT `FK_7CA4E4A08A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_publique`
--
ALTER TABLE `servitude_publique`
  ADD CONSTRAINT `FK_56AA69FC8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `servitude_urbanisme`
--
ALTER TABLE `servitude_urbanisme`
  ADD CONSTRAINT `FK_4C9264568A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `sta2_roues`
--
ALTER TABLE `sta2_roues`
  ADD CONSTRAINT `FK_EE352B6D8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `sta_automobile`
--
ALTER TABLE `sta_automobile`
  ADD CONSTRAINT `FK_390D383F8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `tache`
--
ALTER TABLE `tache`
  ADD CONSTRAINT `FK_938720757E3C61F9` FOREIGN KEY (`owner_id`) REFERENCES `user` (`id`),
  ADD CONSTRAINT `FK_9387207596784F9E` FOREIGN KEY (`probleme_id`) REFERENCES `probleme` (`id`),
  ADD CONSTRAINT `FK_93872075F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_tache` (`id`);

--
-- Contraintes pour la table `telephone`
--
ALTER TABLE `telephone`
  ADD CONSTRAINT `FK_450FF010A4AEAFEA` FOREIGN KEY (`entreprise_id`) REFERENCES `entreprise` (`id`),
  ADD CONSTRAINT `FK_450FF010E7A1254A` FOREIGN KEY (`contact_id`) REFERENCES `contact` (`id`),
  ADD CONSTRAINT `FK_450FF010F6203804` FOREIGN KEY (`statut_id`) REFERENCES `statut_telephone` (`id`);

--
-- Contraintes pour la table `terrain_reg_const`
--
ALTER TABLE `terrain_reg_const`
  ADD CONSTRAINT `FK_4DC07FCB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `trace_deau`
--
ALTER TABLE `trace_deau`
  ADD CONSTRAINT `FK_20C920A334A8A769` FOREIGN KEY (`eau_terrain_id`) REFERENCES `eau_terrain` (`id`);

--
-- Contraintes pour la table `type_proprietaire`
--
ALTER TABLE `type_proprietaire`
  ADD CONSTRAINT `FK_EEA023D38A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `vegetation`
--
ALTER TABLE `vegetation`
  ADD CONSTRAINT `FK_D25C7EDB83C27326` FOREIGN KEY (`densite_id`) REFERENCES `densite` (`id`),
  ADD CONSTRAINT `FK_D25C7EDB8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `verif_cadastre`
--
ALTER TABLE `verif_cadastre`
  ADD CONSTRAINT `FK_C0117DA8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_acces`
--
ALTER TABLE `zone_acces`
  ADD CONSTRAINT `FK_76DA94B68A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_cara_cterrain`
--
ALTER TABLE `zone_cara_cterrain`
  ADD CONSTRAINT `FK_2E44B2C58A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_cond_part`
--
ALTER TABLE `zone_cond_part`
  ADD CONSTRAINT `FK_9E5EC5998A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_oblig_mixite_sociale`
--
ALTER TABLE `zone_oblig_mixite_sociale`
  ADD CONSTRAINT `FK_49037A588A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`),
  ADD CONSTRAINT `FK_49037A58C5ED2E02` FOREIGN KEY (`anwser_id`) REFERENCES `type` (`id`);

--
-- Contraintes pour la table `zone_occ_util_int`
--
ALTER TABLE `zone_occ_util_int`
  ADD CONSTRAINT `FK_520ED56D8A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);

--
-- Contraintes pour la table `zone_reseaux`
--
ALTER TABLE `zone_reseaux`
  ADD CONSTRAINT `FK_F79FCB298A2D8B41` FOREIGN KEY (`terrain_id`) REFERENCES `terrain` (`id`);
COMMIT;

/*!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 */;
