Restructuration majeure du projet: migration de flutt vers app, ajout de l'API et mise à jour du site web

This commit is contained in:
d6soft
2025-05-16 09:19:03 +02:00
parent b5aafc424b
commit 5c2620de30
391 changed files with 19780 additions and 7233 deletions

View File

@@ -1,292 +0,0 @@
erDiagram
users ||--o{ ope_pass : "fk_user"
users ||--o{ ope_users : "fk_user"
users ||--o{ ope_users_sectors : "fk_user"
users ||--o{ ope_users_suivis : "fk_user"
users ||--o{ ope_pass_histo : "fk_user"
users ||--o{ medias : "fk_user_creat/fk_user_modif"
users }o--|| users_entites : "fk_entite"
users }o--|| x_users_roles : "fk_role"
users }o--|| x_users_categories : "fk_categorie"
users }o--|| x_users_sous_categories : "fk_sous_categorie"
users }o--|| x_users_grades : "fk_grade"
operations ||--o{ ope_pass : "fk_operation"
operations ||--o{ ope_users : "fk_operation"
operations ||--o{ ope_sectors : "fk_operation"
operations ||--o{ ope_users_sectors : "fk_operation"
operations ||--o{ ope_users_suivis : "fk_operation"
operations }o--|| users_entites : "fk_entite"
sectors ||--o{ ope_users_sectors : "fk_sector"
sectors ||--o{ sectors_adresses : "fk_sector"
sectors ||--o{ sectors_streets : "fk_sector"
ope_sectors ||--o{ ope_users_sectors : "fk_sector"
ope_sectors ||--o{ ope_pass : "fk_sector"
ope_pass ||--o{ ope_pass_histo : "fk_pass"
ope_pass ||--o{ ope_pass_recus : "fk_pass"
ope_pass ||--o{ email_queue : "rowid"
ope_pass }o--|| x_types_reglements : "fk_type_reglement"
x_users_categories ||--o{ x_users_sous_categories : "fk_user_categorie"
x_pays ||--o{ x_regions : "fk_pays"
x_regions ||--o{ x_departements : "fk_region"
x_departements ||--o{ x_villes : "fk_departement"
x_pays }o--|| x_devises : "fk_devise"
users_entites }o--|| x_regions : "fk_region"
users_entites }o--|| x_entites_types : "fk_type"
email_counter {
int id PK
timestamp hour_start
int count
}
email_queue {
int id PK
int rowid "ope_pass.rowid"
varchar to_email
varchar subject
text body
enum status
}
medias {
int rowid PK
varchar support
int support_rowid
varchar fichier
varchar type_fichier
varchar description
datetime date_creat
int fk_user_creat FK
datetime date_modif
int fk_user_modif FK
}
ope_pass {
int rowid PK
int fk_operation FK
int fk_sector FK
int fk_user FK
varchar fk_adresse
datetime date_eve
int fk_type
varchar numero
varchar rue
varchar ville
int fk_habitat
decimal montant
int fk_type_reglement FK
}
ope_pass_histo {
int rowid PK
int fk_pass FK
int fk_user FK
datetime date_histo
varchar sujet
varchar remarque
}
ope_pass_recus {
int rowid PK
int fk_pass FK
varchar chemin
varchar nom_recu
datetime date_recu
}
ope_sectors {
int rowid PK
int fk_operation FK
varchar libelle
text sector
varchar color
}
ope_users {
int rowid PK
int fk_operation FK
int fk_user FK
tinyint active
}
ope_users_sectors {
int rowid PK
int fk_operation FK
int fk_user FK
int fk_sector FK
tinyint active
}
ope_users_suivis {
int rowid PK
int fk_operation FK
int fk_user FK
datetime date_suivi
varchar latitude
varchar longitude
}
operations {
int rowid PK
int fk_entite FK
varchar libelle
date date_deb
date date_fin
tinyint active
}
sectors {
int rowid PK
varchar libelle
text sector
varchar color
tinyint active
}
sectors_adresses {
int rowid PK
varchar fk_adresse
int fk_sector FK
varchar numero
varchar rue
varchar cp
varchar ville
varchar gps_lat
varchar gps_lng
}
sectors_streets {
int rowid PK
int fk_sector FK
varchar fk_adresse
varchar osm_lat
varchar osm_lng
varchar osm_name
varchar osm_street
varchar osm_city
}
users {
int rowid PK
int fk_entite FK
int fk_titre
varchar libelle
varchar prenom
varchar username
varchar userpass
varchar email
int fk_role FK
int fk_categorie FK
int fk_sous_categorie FK
int fk_grade FK
tinyint active
}
users_entites {
int rowid PK
varchar libelle
varchar adresse1
varchar cp
varchar ville
int fk_region FK
int fk_type FK
varchar email
tinyint active
}
x_departements {
int rowid PK
varchar code
int fk_region FK
varchar libelle
}
x_devises {
int rowid PK
varchar code
varchar symbole
varchar libelle
}
x_entites_types {
int rowid PK
varchar libelle
tinyint active
}
x_pays {
int rowid PK
varchar code
int fk_continent
int fk_devise FK
varchar libelle
}
x_regions {
int rowid PK
int fk_pays FK
varchar libelle
varchar libelle_long
}
x_types_passages {
int rowid PK
varchar libelle
varchar color_button
varchar color_mark
}
x_types_reglements {
int rowid PK
varchar libelle
tinyint active
}
x_users_categories {
int rowid PK
varchar libelle
tinyint active
}
x_users_grades {
int rowid PK
varchar libelle
tinyint active
}
x_users_roles {
int rowid PK
varchar libelle
tinyint active
}
x_users_sous_categories {
int rowid PK
int fk_user_categorie FK
varchar libelle
tinyint active
}
x_villes {
int rowid PK
int fk_departement FK
varchar libelle
varchar cp
varchar code_insee
}
z_sessions {
text sid
int fk_user FK
varchar role
timestamp date_modified
varchar ip
varchar browser
}

View File

@@ -94,12 +94,13 @@ La couche de données est responsable de la gestion des données et comprend :
La couche de services fournit des fonctionnalités d'infrastructure et d'intégration :
- `api_service.dart` : Communication avec l'API backend
- `auth_service.dart` : Gestion de l'authentification
- `connectivity_service.dart` : Surveillance de la connectivité réseau
- `location_service.dart` : Services de géolocalisation
- `passage_data_service.dart` : Traitement des données de passage
- `sync_service.dart` : Synchronisation des données locales/serveur
> **Note importante** : La classe `auth_service.dart` a été supprimée et ses fonctionnalités ont été intégrées directement dans `UserRepository` pour simplifier l'architecture et éviter les problèmes de synchronisation entre les deux classes.
## Gestion d'état et injection de dépendances
L'application utilise des instances globales pour la gestion d'état et l'accès aux services. Ces instances sont définies dans le fichier `app.dart` :
@@ -195,9 +196,12 @@ Le flux d'authentification suit ce processus :
1. Vérification initiale de session persistante (Hive)
2. Redirection vers Login/Register si nécessaire
3. Authentification via API Service
4. Stockage sécurisé des informations de session
3. Authentification via `UserRepository` qui communique avec l'API
4. Stockage sécurisé des informations de session dans Hive
5. Redirection vers l'interface appropriée (admin vs utilisateur)
6. Lors de la déconnexion, nettoyage complet des boîtes Hive et redirection vers la page de démarrage
> **Amélioration récente** : Le processus d'authentification a été simplifié en centralisant toute la logique dans `UserRepository`, qui gère maintenant à la fois la connexion, la déconnexion, l'affichage des overlays de chargement et les redirections.
## Widgets communs

View File

@@ -0,0 +1,147 @@
<?php
// Script de conversion CSV Google Agenda vers format GitLab pour importation de tickets
// Usage: php convert-google-calendar-to-gitlab.php planninggeo2025googleagenda.csv gitlab-issues.csv
// Vérifier les arguments
if ($argc < 3) {
echo "Usage: php convert-google-calendar-to-gitlab.php [fichier_source] [fichier_destination]\n";
exit(1);
}
$source_file = $argv[1];
$dest_file = $argv[2];
// Vérifier l'existence du fichier source
if (!file_exists($source_file)) {
echo "Erreur: Le fichier source '{$source_file}' n'existe pas.\n";
exit(1);
}
// Ouvrir le fichier source
$input = fopen($source_file, 'r');
if ($input === false) {
echo "Erreur: Impossible d'ouvrir le fichier source '{$source_file}'.\n";
exit(1);
}
// Créer le fichier de destination
$output = fopen($dest_file, 'w');
if ($output === false) {
echo "Erreur: Impossible de créer le fichier destination '{$dest_file}'.\n";
fclose($input);
exit(1);
}
// Lire l'en-tête pour identifier les colonnes
$header = fgetcsv($input);
// Vérifier que l'en-tête contient les colonnes attendues
$required_columns = ['Subject', 'Start Date', 'End Date', 'Description', 'Location'];
$missing_columns = [];
foreach ($required_columns as $col) {
if (array_search($col, $header) === false) {
$missing_columns[] = $col;
}
}
if (!empty($missing_columns)) {
echo "Attention: Les colonnes suivantes sont manquantes dans le fichier source: " .
implode(', ', $missing_columns) . "\n";
echo "Le script continuera avec les colonnes disponibles.\n";
}
// Trouver les indices des colonnes dans l'en-tête
$column_indices = [
'subject' => array_search('Subject', $header),
'start_date' => array_search('Start Date', $header),
'start_time' => array_search('Start Time', $header),
'end_date' => array_search('End Date', $header),
'end_time' => array_search('End Time', $header),
'all_day' => array_search('All Day Event', $header),
'description' => array_search('Description', $header),
'location' => array_search('Location', $header),
'private' => array_search('Private', $header)
];
// Écrire l'en-tête GitLab
fputcsv($output, ['title', 'description', 'labels', 'due_date']);
// Compteur d'événements traités
$event_count = 0;
// Traiter chaque ligne du fichier source
while (($data = fgetcsv($input)) !== false) {
// S'assurer que la ligne contient au moins un sujet
if (!isset($data[$column_indices['subject']]) || empty(trim($data[$column_indices['subject']]))) {
continue; // Ignorer les lignes sans sujet
}
// Extraire les données
$title = $data[$column_indices['subject']];
// Préparer la description
$description_parts = [];
// Ajouter les dates
$start_date = $column_indices['start_date'] !== false ? $data[$column_indices['start_date']] : '';
$start_time = $column_indices['start_time'] !== false ? $data[$column_indices['start_time']] : '';
$end_date = $column_indices['end_date'] !== false ? $data[$column_indices['end_date']] : '';
$end_time = $column_indices['end_time'] !== false ? $data[$column_indices['end_time']] : '';
$all_day = $column_indices['all_day'] !== false ? ($data[$column_indices['all_day']] === 'TRUE') : false;
// Formater la date et l'heure
$date_info = "Date: " . $start_date;
if (!$all_day && !empty($start_time)) {
$date_info .= " " . $start_time;
}
if (!empty($end_date) && $end_date !== $start_date) {
$date_info .= " - " . $end_date;
if (!$all_day && !empty($end_time)) {
$date_info .= " " . $end_time;
}
} elseif (!$all_day && !empty($end_time) && $end_time !== $start_time) {
$date_info .= " - " . $end_time;
}
$description_parts[] = $date_info;
// Ajouter le lieu
if ($column_indices['location'] !== false && !empty($data[$column_indices['location']])) {
$description_parts[] = "Lieu: " . $data[$column_indices['location']];
}
// Ajouter la description
if ($column_indices['description'] !== false && !empty($data[$column_indices['description']])) {
$description_parts[] = $data[$column_indices['description']];
}
// Joindre toutes les parties de la description
$description = implode("\n\n", $description_parts);
// Définir les étiquettes (labels)
$labels = "agenda,planning";
// Si c'est un événement privé, ajouter l'étiquette "privé"
if ($column_indices['private'] !== false && $data[$column_indices['private']] === 'TRUE') {
$labels .= ",privé";
}
// Déterminer la date d'échéance (due_date)
$due_date = !empty($end_date) ? $end_date : $start_date;
// Écrire la ligne dans le fichier de destination
fputcsv($output, [$title, $description, $labels, $due_date]);
$event_count++;
}
// Fermer les fichiers
fclose($input);
fclose($output);
echo "Conversion terminée avec succès!\n";
echo "Nombre d'événements convertis: {$event_count}\n";
echo "Le fichier '{$dest_file}' est prêt à être importé dans GitLab.\n";
?>

918
docs/geo_app.dump Normal file
View File

@@ -0,0 +1,918 @@
-- MySQL dump 10.13 Distrib 8.0.27, for macos11 (arm64)
--
-- Host: in3.d6soft.fr Database: geo_app
-- ------------------------------------------------------
-- Server version 11.4.5-MariaDB
/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `chat_anonymous_users`
--
DROP TABLE IF EXISTS `chat_anonymous_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_anonymous_users` (
`id` varchar(50) NOT NULL,
`device_id` varchar(100) NOT NULL,
`name` varchar(100) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`converted_to_user_id` int(10) unsigned DEFAULT NULL,
`metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),
PRIMARY KEY (`id`),
KEY `idx_device_id` (`device_id`),
KEY `idx_converted_user` (`converted_to_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_attachments`
--
DROP TABLE IF EXISTS `chat_attachments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_attachments` (
`id` varchar(50) NOT NULL,
`fk_message` varchar(50) NOT NULL,
`file_name` varchar(255) NOT NULL,
`file_path` varchar(500) NOT NULL,
`file_type` varchar(100) NOT NULL,
`file_size` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `idx_message` (`fk_message`),
CONSTRAINT `fk_chat_attachments_message` FOREIGN KEY (`fk_message`) REFERENCES `chat_messages` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_audience_targets`
--
DROP TABLE IF EXISTS `chat_audience_targets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_audience_targets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_room` varchar(50) NOT NULL,
`target_type` enum('role','entity','all','combined') NOT NULL DEFAULT 'all',
`target_id` varchar(50) DEFAULT NULL,
`role_filter` varchar(20) DEFAULT NULL,
`entity_filter` varchar(50) DEFAULT NULL,
`date_creation` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `idx_room` (`fk_room`),
KEY `idx_type` (`target_type`),
CONSTRAINT `fk_chat_audience_targets_room` FOREIGN KEY (`fk_room`) REFERENCES `chat_rooms` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_broadcast_lists`
--
DROP TABLE IF EXISTS `chat_broadcast_lists`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_broadcast_lists` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_room` varchar(50) NOT NULL,
`name` varchar(100) NOT NULL,
`description` text DEFAULT NULL,
`fk_user_creator` int(10) unsigned NOT NULL,
`date_creation` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `idx_room` (`fk_room`),
KEY `idx_user_creator` (`fk_user_creator`),
CONSTRAINT `fk_chat_broadcast_lists_room` FOREIGN KEY (`fk_room`) REFERENCES `chat_rooms` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Temporary view structure for view `chat_conversations_unread`
--
DROP TABLE IF EXISTS `chat_conversations_unread`;
/*!50001 DROP VIEW IF EXISTS `chat_conversations_unread`*/;
SET @saved_cs_client = @@character_set_client;
/*!50503 SET character_set_client = utf8mb4 */;
/*!50001 CREATE VIEW `chat_conversations_unread` AS SELECT
1 AS `id`,
1 AS `type`,
1 AS `title`,
1 AS `date_creation`,
1 AS `fk_user`,
1 AS `fk_entite`,
1 AS `statut`,
1 AS `description`,
1 AS `reply_permission`,
1 AS `is_pinned`,
1 AS `expiry_date`,
1 AS `updated_at`,
1 AS `total_messages`,
1 AS `read_messages`,
1 AS `unread_messages`,
1 AS `last_message_date`*/;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `chat_messages`
--
DROP TABLE IF EXISTS `chat_messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_messages` (
`id` varchar(50) NOT NULL,
`fk_room` varchar(50) NOT NULL,
`fk_user` int(10) unsigned DEFAULT NULL,
`sender_type` enum('user','anonymous','system') NOT NULL DEFAULT 'user',
`content` text DEFAULT NULL,
`content_type` enum('text','image','file') NOT NULL DEFAULT 'text',
`date_sent` timestamp NOT NULL DEFAULT current_timestamp(),
`date_delivered` timestamp NULL DEFAULT NULL,
`date_read` timestamp NULL DEFAULT NULL,
`statut` enum('envoye','livre','lu','error') NOT NULL DEFAULT 'envoye',
`is_announcement` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_room` (`fk_room`),
KEY `idx_user` (`fk_user`),
KEY `idx_date` (`date_sent`),
KEY `idx_status` (`statut`),
KEY `idx_messages_unread` (`fk_room`,`statut`),
CONSTRAINT `fk_chat_messages_room` FOREIGN KEY (`fk_room`) REFERENCES `chat_rooms` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_notifications`
--
DROP TABLE IF EXISTS `chat_notifications`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_notifications` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`fk_user` int(10) unsigned NOT NULL,
`fk_message` varchar(50) DEFAULT NULL,
`fk_room` varchar(50) DEFAULT NULL,
`type` varchar(50) NOT NULL,
`contenu` text DEFAULT NULL,
`date_creation` timestamp NOT NULL DEFAULT current_timestamp(),
`date_lecture` timestamp NULL DEFAULT NULL,
`statut` enum('non_lue','lue') NOT NULL DEFAULT 'non_lue',
PRIMARY KEY (`id`),
KEY `idx_user` (`fk_user`),
KEY `idx_message` (`fk_message`),
KEY `idx_room` (`fk_room`),
KEY `idx_statut` (`statut`),
KEY `idx_notifications_unread` (`fk_user`,`statut`),
CONSTRAINT `fk_chat_notifications_message` FOREIGN KEY (`fk_message`) REFERENCES `chat_messages` (`id`) ON DELETE SET NULL,
CONSTRAINT `fk_chat_notifications_room` FOREIGN KEY (`fk_room`) REFERENCES `chat_rooms` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_offline_queue`
--
DROP TABLE IF EXISTS `chat_offline_queue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_offline_queue` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`operation_type` varchar(50) NOT NULL,
`operation_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`operation_data`)),
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`processed_at` timestamp NULL DEFAULT NULL,
`status` enum('pending','processing','completed','failed') NOT NULL DEFAULT 'pending',
`error_message` text DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_status` (`status`),
KEY `idx_created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_participants`
--
DROP TABLE IF EXISTS `chat_participants`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_participants` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_room` varchar(50) NOT NULL,
`id_user` int(10) unsigned DEFAULT NULL,
`anonymous_id` varchar(50) DEFAULT NULL,
`role` enum('administrateur','participant','en_lecture_seule') NOT NULL DEFAULT 'participant',
`date_ajout` timestamp NOT NULL DEFAULT current_timestamp(),
`notification_activee` tinyint(1) unsigned NOT NULL DEFAULT 1,
`last_read_message_id` varchar(50) DEFAULT NULL,
`via_target` tinyint(1) unsigned NOT NULL DEFAULT 0,
`can_reply` tinyint(1) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uc_room_user` (`id_room`,`id_user`),
KEY `idx_room` (`id_room`),
KEY `idx_user` (`id_user`),
KEY `idx_anonymous_id` (`anonymous_id`),
KEY `idx_participants_active` (`id_room`,`id_user`,`notification_activee`),
CONSTRAINT `fk_chat_participants_room` FOREIGN KEY (`id_room`) REFERENCES `chat_rooms` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_read_messages`
--
DROP TABLE IF EXISTS `chat_read_messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_read_messages` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`fk_message` varchar(50) NOT NULL,
`fk_user` int(10) unsigned NOT NULL,
`date_read` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `uc_message_user` (`fk_message`,`fk_user`),
KEY `idx_message` (`fk_message`),
KEY `idx_user` (`fk_user`),
CONSTRAINT `fk_chat_read_messages_message` FOREIGN KEY (`fk_message`) REFERENCES `chat_messages` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `chat_rooms`
--
DROP TABLE IF EXISTS `chat_rooms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `chat_rooms` (
`id` varchar(50) NOT NULL,
`type` enum('privee','groupe','liste_diffusion','broadcast','announcement') NOT NULL,
`title` varchar(100) DEFAULT NULL,
`date_creation` timestamp NOT NULL DEFAULT current_timestamp(),
`fk_user` int(10) unsigned NOT NULL,
`fk_entite` int(10) unsigned DEFAULT NULL,
`statut` enum('active','archive') NOT NULL DEFAULT 'active',
`description` text DEFAULT NULL,
`reply_permission` enum('all','admins_only','sender_only','none') NOT NULL DEFAULT 'all',
`is_pinned` tinyint(1) unsigned NOT NULL DEFAULT 0,
`expiry_date` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
PRIMARY KEY (`id`),
KEY `idx_user` (`fk_user`),
KEY `idx_entite` (`fk_entite`),
KEY `idx_type` (`type`),
KEY `idx_statut` (`statut`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `email_counter`
--
DROP TABLE IF EXISTS `email_counter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_counter` (
`id` int(10) unsigned NOT NULL DEFAULT 1,
`hour_start` timestamp NULL DEFAULT NULL,
`count` int(10) unsigned DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `email_queue`
--
DROP TABLE IF EXISTS `email_queue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_queue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_pass` int(10) unsigned NOT NULL DEFAULT 0,
`to_email` varchar(255) DEFAULT NULL,
`subject` varchar(255) DEFAULT NULL,
`body` text DEFAULT NULL,
`headers` text DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
`status` enum('pending','sent','failed') DEFAULT 'pending',
`attempts` int(10) unsigned DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `entites`
--
DROP TABLE IF EXISTS `entites`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `entites` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`encrypted_name` varchar(255) DEFAULT NULL,
`adresse1` varchar(45) DEFAULT '',
`adresse2` varchar(45) DEFAULT '',
`code_postal` varchar(5) DEFAULT '',
`ville` varchar(45) DEFAULT '',
`fk_region` int(10) unsigned DEFAULT NULL,
`fk_type` int(10) unsigned DEFAULT 1,
`encrypted_phone` varchar(128) DEFAULT '',
`encrypted_mobile` varchar(128) DEFAULT '',
`encrypted_email` varchar(255) DEFAULT '',
`gps_lat` varchar(20) NOT NULL DEFAULT '',
`gps_lng` varchar(20) NOT NULL DEFAULT '',
`chk_stripe` tinyint(1) unsigned NOT NULL DEFAULT 0,
`encrypted_stripe_id` varchar(255) DEFAULT '',
`encrypted_iban` varchar(255) DEFAULT '',
`encrypted_bic` varchar(128) DEFAULT '',
`chk_demo` tinyint(1) unsigned DEFAULT 1,
`chk_mdp_manuel` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT 'Gestion des mots de passe manuelle O/N',
`chk_copie_mail_recu` tinyint(1) unsigned NOT NULL DEFAULT 0,
`chk_accept_sms` tinyint(1) unsigned NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
KEY `entites_ibfk_1` (`fk_region`),
KEY `entites_ibfk_2` (`fk_type`),
CONSTRAINT `entites_ibfk_1` FOREIGN KEY (`fk_region`) REFERENCES `x_regions` (`id`) ON UPDATE CASCADE,
CONSTRAINT `entites_ibfk_2` FOREIGN KEY (`fk_type`) REFERENCES `x_entites_types` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1229 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `medias`
--
DROP TABLE IF EXISTS `medias`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `medias` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`support` varchar(45) NOT NULL DEFAULT '',
`support_id` int(10) unsigned NOT NULL DEFAULT 0,
`fichier` varchar(250) NOT NULL DEFAULT '',
`description` varchar(100) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`fk_user_creat` int(10) unsigned NOT NULL DEFAULT 0,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
`fk_user_modif` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=176 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ope_pass`
--
DROP TABLE IF EXISTS `ope_pass`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int(10) unsigned NOT NULL DEFAULT 0,
`fk_sector` int(10) unsigned DEFAULT 0,
`fk_user` int(10) unsigned NOT NULL DEFAULT 0,
`fk_adresse` varchar(25) DEFAULT '' COMMENT 'adresses.cp??.id',
`passed_at` timestamp NULL DEFAULT NULL COMMENT 'Date du passage',
`fk_type` int(10) unsigned DEFAULT 0,
`numero` varchar(10) NOT NULL DEFAULT '',
`rue` varchar(75) NOT NULL DEFAULT '',
`rue_bis` varchar(1) NOT NULL DEFAULT '',
`ville` varchar(75) NOT NULL DEFAULT '',
`fk_habitat` int(10) unsigned DEFAULT 1,
`appt` varchar(5) DEFAULT '',
`niveau` varchar(5) DEFAULT '',
`residence` varchar(75) DEFAULT '',
`gps_lat` varchar(20) NOT NULL DEFAULT '',
`gps_lng` varchar(20) NOT NULL DEFAULT '',
`encrypted_name` varchar(255) NOT NULL DEFAULT '',
`montant` decimal(7,2) NOT NULL DEFAULT 0.00,
`fk_type_reglement` int(10) unsigned DEFAULT 1,
`remarque` text DEFAULT '',
`encrypted_email` varchar(255) DEFAULT '',
`nom_recu` varchar(50) DEFAULT NULL,
`date_recu` timestamp NULL DEFAULT NULL COMMENT 'Date de réception',
`date_creat_recu` timestamp NULL DEFAULT NULL COMMENT 'Date de création du reçu',
`date_sent_recu` timestamp NULL DEFAULT NULL COMMENT 'Date envoi du reçu',
`email_erreur` varchar(30) DEFAULT '',
`chk_email_sent` tinyint(1) unsigned NOT NULL DEFAULT 0,
`encrypted_phone` varchar(128) NOT NULL DEFAULT '',
`is_striped` tinyint(1) unsigned NOT NULL DEFAULT 0,
`docremis` tinyint(1) unsigned DEFAULT 0,
`date_repasser` timestamp NULL DEFAULT NULL COMMENT 'Date prévue pour repasser',
`nb_passages` int(11) DEFAULT 1 COMMENT 'Nb passages pour les a repasser',
`chk_gps_maj` tinyint(1) unsigned DEFAULT 0,
`chk_map_create` tinyint(1) unsigned DEFAULT 0,
`chk_mobile` tinyint(1) unsigned DEFAULT 0,
`chk_synchro` tinyint(1) unsigned DEFAULT 1 COMMENT 'chk synchro entre web et appli',
`chk_api_adresse` tinyint(1) unsigned DEFAULT 0,
`chk_maj_adresse` tinyint(1) unsigned DEFAULT 0,
`anomalie` tinyint(1) unsigned DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
KEY `fk_operation` (`fk_operation`),
KEY `fk_sector` (`fk_sector`),
KEY `fk_user` (`fk_user`),
KEY `fk_type` (`fk_type`),
KEY `fk_type_reglement` (`fk_type_reglement`),
KEY `email` (`encrypted_email`),
CONSTRAINT `ope_pass_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ope_pass_ibfk_2` FOREIGN KEY (`fk_sector`) REFERENCES `ope_sectors` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ope_pass_ibfk_3` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ope_pass_ibfk_4` FOREIGN KEY (`fk_type_reglement`) REFERENCES `x_types_reglements` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19499566 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ope_pass_histo`
--
DROP TABLE IF EXISTS `ope_pass_histo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass_histo` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_pass` int(10) unsigned NOT NULL DEFAULT 0,
`date_histo` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date historique',
`sujet` varchar(50) DEFAULT NULL,
`remarque` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `ope_pass_histo_fk_pass_IDX` (`fk_pass`) USING BTREE,
KEY `ope_pass_histo_date_histo_IDX` (`date_histo`) USING BTREE,
CONSTRAINT `ope_pass_histo_ibfk_1` FOREIGN KEY (`fk_pass`) REFERENCES `ope_pass` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6752 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ope_sectors`
--
DROP TABLE IF EXISTS `ope_sectors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_sectors` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int(10) unsigned NOT NULL DEFAULT 0,
`fk_old_sector` int(10) unsigned DEFAULT NULL,
`libelle` varchar(75) NOT NULL DEFAULT '',
`sector` text NOT NULL DEFAULT '',
`color` varchar(7) NOT NULL DEFAULT '#4B77BE',
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned NOT NULL DEFAULT 0,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned NOT NULL DEFAULT 0,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `fk_operation` (`fk_operation`),
CONSTRAINT `ope_sectors_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=27675 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ope_users`
--
DROP TABLE IF EXISTS `ope_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int(10) unsigned NOT NULL DEFAULT 0,
`fk_user` int(10) unsigned NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `ope_users_ibfk_1` (`fk_operation`),
KEY `ope_users_ibfk_2` (`fk_user`),
CONSTRAINT `ope_users_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ope_users_ibfk_2` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=199006 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ope_users_sectors`
--
DROP TABLE IF EXISTS `ope_users_sectors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users_sectors` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int(10) unsigned NOT NULL DEFAULT 0,
`fk_user` int(10) unsigned NOT NULL DEFAULT 0,
`fk_sector` int(10) unsigned NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned NOT NULL DEFAULT 0,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `fk_operation` (`fk_operation`),
KEY `fk_user` (`fk_user`),
KEY `fk_sector` (`fk_sector`),
CONSTRAINT `ope_users_sectors_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ope_users_sectors_ibfk_2` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ope_users_sectors_ibfk_3` FOREIGN KEY (`fk_sector`) REFERENCES `ope_sectors` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=48082 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ope_users_suivis`
--
DROP TABLE IF EXISTS `ope_users_suivis`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users_suivis` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int(10) unsigned NOT NULL DEFAULT 0,
`fk_user` int(10) unsigned NOT NULL DEFAULT 0,
`date_suivi` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date du suivi',
`gps_lat` varchar(20) NOT NULL DEFAULT '',
`gps_lng` varchar(20) NOT NULL DEFAULT '',
`vitesse` varchar(20) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned NOT NULL DEFAULT 0,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `operations`
--
DROP TABLE IF EXISTS `operations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_entite` int(10) unsigned NOT NULL DEFAULT 1,
`libelle` varchar(75) NOT NULL DEFAULT '',
`date_deb` date NOT NULL DEFAULT '0000-00-00',
`date_fin` date NOT NULL DEFAULT '0000-00-00',
`chk_distinct_sectors` tinyint(1) unsigned NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned NOT NULL DEFAULT 0,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned NOT NULL DEFAULT 0,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
KEY `fk_entite` (`fk_entite`),
KEY `date_deb` (`date_deb`),
CONSTRAINT `operations_ibfk_1` FOREIGN KEY (`fk_entite`) REFERENCES `entites` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3121 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `params`
--
DROP TABLE IF EXISTS `params`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `params` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(35) NOT NULL DEFAULT '',
`valeur` varchar(255) NOT NULL DEFAULT '',
`aide` varchar(150) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `sectors_adresses`
--
DROP TABLE IF EXISTS `sectors_adresses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sectors_adresses` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_adresse` varchar(25) DEFAULT NULL COMMENT 'adresses.cp??.id',
`osm_id` int(10) unsigned NOT NULL DEFAULT 0,
`fk_sector` int(10) unsigned NOT NULL DEFAULT 0,
`osm_name` varchar(50) NOT NULL DEFAULT '',
`numero` varchar(5) NOT NULL DEFAULT '',
`rue_bis` varchar(5) NOT NULL DEFAULT '',
`rue` varchar(60) NOT NULL DEFAULT '',
`cp` varchar(5) NOT NULL DEFAULT '',
`ville` varchar(60) NOT NULL DEFAULT '',
`gps_lat` varchar(20) NOT NULL DEFAULT '',
`gps_lng` varchar(20) NOT NULL DEFAULT '',
`osm_date_creat` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
PRIMARY KEY (`id`),
KEY `sectors_adresses_fk_sector_index` (`fk_sector`),
KEY `sectors_adresses_numero_index` (`numero`),
KEY `sectors_adresses_rue_index` (`rue`),
KEY `sectors_adresses_ville_index` (`ville`),
CONSTRAINT `sectors_adresses_ibfk_1` FOREIGN KEY (`fk_sector`) REFERENCES `ope_sectors` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1562946 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_entite` int(10) unsigned DEFAULT 1,
`fk_role` int(10) unsigned DEFAULT 1,
`fk_titre` int(10) unsigned DEFAULT 1,
`encrypted_name` varchar(255) DEFAULT NULL,
`first_name` varchar(45) DEFAULT NULL,
`sect_name` varchar(60) DEFAULT '',
`encrypted_user_name` varchar(128) DEFAULT '',
`user_pass_hash` varchar(60) DEFAULT NULL,
`encrypted_phone` varchar(128) DEFAULT NULL,
`encrypted_mobile` varchar(128) DEFAULT NULL,
`encrypted_email` varchar(255) DEFAULT '',
`chk_alert_email` tinyint(1) unsigned DEFAULT 1,
`chk_suivi` tinyint(1) unsigned DEFAULT 0,
`date_naissance` date DEFAULT NULL,
`date_embauche` date DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Date de création',
`fk_user_creat` int(10) unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'Date de modification',
`fk_user_modif` int(10) unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
KEY `fk_entite` (`fk_entite`),
KEY `username` (`encrypted_user_name`),
KEY `users_ibfk_2` (`fk_role`),
KEY `users_ibfk_3` (`fk_titre`),
CONSTRAINT `users_ibfk_1` FOREIGN KEY (`fk_entite`) REFERENCES `entites` (`id`) ON UPDATE CASCADE,
CONSTRAINT `users_ibfk_2` FOREIGN KEY (`fk_role`) REFERENCES `x_users_roles` (`id`) ON UPDATE CASCADE,
CONSTRAINT `users_ibfk_3` FOREIGN KEY (`fk_titre`) REFERENCES `x_users_titres` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10027747 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_departements`
--
DROP TABLE IF EXISTS `x_departements`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_departements` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) DEFAULT NULL,
`fk_region` int(10) unsigned DEFAULT 1,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `x_departements_ibfk_1` (`fk_region`),
CONSTRAINT `x_departements_ibfk_1` FOREIGN KEY (`fk_region`) REFERENCES `x_regions` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_devises`
--
DROP TABLE IF EXISTS `x_devises`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_devises` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) DEFAULT NULL,
`symbole` varchar(6) DEFAULT NULL,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_entites_types`
--
DROP TABLE IF EXISTS `x_entites_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_entites_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_pays`
--
DROP TABLE IF EXISTS `x_pays`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_pays` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) DEFAULT NULL,
`fk_continent` int(10) unsigned DEFAULT NULL,
`fk_devise` int(10) unsigned DEFAULT 1,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `x_pays_ibfk_1` (`fk_devise`),
CONSTRAINT `x_pays_ibfk_1` FOREIGN KEY (`fk_devise`) REFERENCES `x_devises` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Table des pays avec leurs codes' `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_regions`
--
DROP TABLE IF EXISTS `x_regions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_regions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_pays` int(10) unsigned DEFAULT 1,
`libelle` varchar(45) DEFAULT NULL,
`libelle_long` varchar(45) DEFAULT NULL,
`table_osm` varchar(45) DEFAULT NULL,
`departements` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `x_regions_ibfk_1` (`fk_pays`),
CONSTRAINT `x_regions_ibfk_1` FOREIGN KEY (`fk_pays`) REFERENCES `x_pays` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_types_passages`
--
DROP TABLE IF EXISTS `x_types_passages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_types_passages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(10) DEFAULT NULL,
`color_button` varchar(15) DEFAULT NULL,
`color_mark` varchar(15) DEFAULT NULL,
`color_table` varchar(15) DEFAULT NULL,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_types_reglements`
--
DROP TABLE IF EXISTS `x_types_reglements`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_types_reglements` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_users_roles`
--
DROP TABLE IF EXISTS `x_users_roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_roles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Les différents rôles des utilisateurs' `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_users_titres`
--
DROP TABLE IF EXISTS `x_users_titres`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_titres` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Les différents titres des utilisateurs' `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_villes`
--
DROP TABLE IF EXISTS `x_villes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_villes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fk_departement` int(10) unsigned DEFAULT 1,
`libelle` varchar(65) DEFAULT NULL,
`code_postal` varchar(5) DEFAULT NULL,
`code_insee` varchar(5) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT 1,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `x_villes_ibfk_1` (`fk_departement`),
CONSTRAINT `x_villes_ibfk_1` FOREIGN KEY (`fk_departement`) REFERENCES `x_departements` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=38950 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `z_sessions`
--
DROP TABLE IF EXISTS `z_sessions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `z_sessions` (
`sid` text NOT NULL,
`fk_user` int(11) NOT NULL,
`role` varchar(10) DEFAULT NULL,
`date_modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`ip` varchar(50) NOT NULL,
`browser` varchar(150) NOT NULL,
`data` mediumtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci `PAGE_COMPRESSED`='ON';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Final view structure for view `chat_conversations_unread`
--
/*!50001 DROP VIEW IF EXISTS `chat_conversations_unread`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = utf8mb4 */;
/*!50001 SET character_set_results = utf8mb4 */;
/*!50001 SET collation_connection = utf8mb4_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `chat_conversations_unread` AS select `r`.`id` AS `id`,`r`.`type` AS `type`,`r`.`title` AS `title`,`r`.`date_creation` AS `date_creation`,`r`.`fk_user` AS `fk_user`,`r`.`fk_entite` AS `fk_entite`,`r`.`statut` AS `statut`,`r`.`description` AS `description`,`r`.`reply_permission` AS `reply_permission`,`r`.`is_pinned` AS `is_pinned`,`r`.`expiry_date` AS `expiry_date`,`r`.`updated_at` AS `updated_at`,count(distinct `m`.`id`) AS `total_messages`,count(distinct `rm`.`id`) AS `read_messages`,count(distinct `m`.`id`) - count(distinct `rm`.`id`) AS `unread_messages`,(select `geo_app`.`chat_messages`.`date_sent` from `chat_messages` where `geo_app`.`chat_messages`.`fk_room` = `r`.`id` order by `geo_app`.`chat_messages`.`date_sent` desc limit 1) AS `last_message_date` from ((`chat_rooms` `r` left join `chat_messages` `m` on(`r`.`id` = `m`.`fk_room`)) left join `chat_read_messages` `rm` on(`m`.`id` = `rm`.`fk_message`)) group by `r`.`id` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-05-15 9:31:42

View File

@@ -1,623 +0,0 @@
-- Création de la base de données geo_app si elle n'existe pas
DROP DATABASE IF EXISTS `geo_app`;
CREATE DATABASE IF NOT EXISTS `geo_app` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- Création de l'utilisateur et attribution des droits
CREATE USER IF NOT EXISTS 'geo_app_user'@'localhost' IDENTIFIED BY 'QO:96df*?k{4W6m';
GRANT SELECT, INSERT, UPDATE, DELETE ON `geo_app`.* TO 'geo_app_user'@'localhost';
FLUSH PRIVILEGES;
USE geo_app;
--
-- Table structure for table `email_counter`
--
DROP TABLE IF EXISTS `email_counter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_counter` (
`id` int unsigned NOT NULL DEFAULT '1',
`hour_start` timestamp NULL DEFAULT NULL,
`count` int unsigned DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `x_devises`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_devises` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) DEFAULT NULL,
`symbole` varchar(6) DEFAULT NULL,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_entites_types`
--
DROP TABLE IF EXISTS `x_entites_types`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_entites_types` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_types_passages`
--
DROP TABLE IF EXISTS `x_types_passages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_types_passages` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color_button` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color_mark` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color_table` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_types_reglements`
--
DROP TABLE IF EXISTS `x_types_reglements`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_types_reglements` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `x_users_roles`
--
DROP TABLE IF EXISTS `x_users_roles`;
CREATE TABLE `x_users_roles` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Les différents rôles des utilisateurs';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `x_users_titres`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_users_titres` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Les différents titres des utilisateurs';
DROP TABLE IF EXISTS `x_pays`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_pays` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) DEFAULT NULL,
`fk_continent` int unsigned DEFAULT NULL,
`fk_devise` int unsigned DEFAULT '1',
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
CONSTRAINT `x_pays_ibfk_1` FOREIGN KEY (`fk_devise`) REFERENCES `x_devises` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Table des pays avec leurs codes';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `x_regions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_regions` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_pays` int unsigned DEFAULT '1',
`libelle` varchar(45) DEFAULT NULL,
`libelle_long` varchar(45) DEFAULT NULL,
`table_osm` varchar(45) DEFAULT NULL,
`departements` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
CONSTRAINT `x_regions_ibfk_1` FOREIGN KEY (`fk_pays`) REFERENCES `x_pays` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `x_departements`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_departements` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) DEFAULT NULL,
`fk_region` int unsigned DEFAULT '1',
`libelle` varchar(45) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
CONSTRAINT `x_departements_ibfk_1` FOREIGN KEY (`fk_region`) REFERENCES `x_regions` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entites`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `entites` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`encrypted_name` varchar(255) DEFAULT NULL,
`adresse1` varchar(45) DEFAULT '',
`adresse2` varchar(45) DEFAULT '',
`cp` varchar(5) DEFAULT '',
`ville` varchar(45) DEFAULT '',
`fk_region` int unsigned DEFAULT NULL,
`fk_type` int unsigned DEFAULT '1',
`encrypted_phone` varchar(128) DEFAULT '',
`encrypted_mobile` varchar(128) DEFAULT '',
`encrypted_email` varchar(255) DEFAULT '',
`gps_lat` varchar(20) NOT NULL DEFAULT '',
`gps_lng` varchar(20) NOT NULL DEFAULT '',
`encrypted_stripe_id` varchar(255) DEFAULT '',
`iban` varchar(30) DEFAULT '',
`bic` varchar(15) DEFAULT '',
`chk_demo` tinyint(1) unsigned DEFAULT '1',
`chk_mdp_manuel` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'Gestion des mots de passe manuelle O/N',
`chk_copie_mail_recu` tinyint(1) unsigned NOT NULL DEFAULT '0',
`chk_accept_sms` tinyint(1) unsigned NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
CONSTRAINT `entites_ibfk_1` FOREIGN KEY (`fk_region`) REFERENCES `x_regions` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `entites_ibfk_2` FOREIGN KEY (`fk_type`) REFERENCES `x_entites_types` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `x_villes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `x_villes` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_departement` int unsigned DEFAULT '1',
`libelle` varchar(65) DEFAULT NULL,
`cp` varchar(5) DEFAULT NULL,
`code_insee` varchar(5) DEFAULT NULL,
`departement` varchar(65) DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
CONSTRAINT `x_villes_ibfk_1` FOREIGN KEY (`fk_departement`) REFERENCES `x_departements` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=38950 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_entite` int unsigned DEFAULT '1',
`fk_role` int unsigned DEFAULT '1',
`fk_titre` int unsigned DEFAULT '1',
`num_adherent` int unsigned NOT NULL DEFAULT '0',
`encrypted_name` varchar(255) DEFAULT NULL,
`first_name` varchar(45) DEFAULT NULL,
`sect_name` varchar(60) DEFAULT '',
`encrypt_user_name` varchar(128) DEFAULT '',
`user_pswd` varchar(60) DEFAULT NULL,
`encrypt_phone` varchar(128) DEFAULT NULL,
`encrypt_mobile` varchar(128) DEFAULT NULL,
`encrypt_email` varchar(255) DEFAULT '',
`infos` varchar(200) NOT NULL DEFAULT '',
`chk_alert_email` tinyint(1) unsigned DEFAULT '1',
`chk_suivi` tinyint(1) unsigned DEFAULT '0',
`date_naissance` date DEFAULT NULL,
`date_embauche` date DEFAULT NULL,
`anciennete` varchar(20) DEFAULT '-',
`matricule` varchar(10) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
KEY `fk_entite` (`fk_entite`),
KEY `username` (`encrypt_user_name`),
CONSTRAINT `users_ibfk_1` FOREIGN KEY (`fk_entite`) REFERENCES `entites` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `users_ibfk_2` FOREIGN KEY (`fk_role`) REFERENCES `x_users_roles` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `users_ibfk_3` FOREIGN KEY (`fk_titre`) REFERENCES `x_users_titres` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `operations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `operations` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_entite` int unsigned NOT NULL DEFAULT '1',
`libelle` varchar(75) NOT NULL DEFAULT '',
`date_deb` date NOT NULL DEFAULT '0000-00-00',
`date_fin` date NOT NULL DEFAULT '0000-00-00',
`chk_distinct_sectors` tinyint(1) unsigned NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned NOT NULL DEFAULT '0',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned NOT NULL DEFAULT '0',
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `fk_entite` (`fk_entite`),
KEY `date_deb` (`date_deb`),
CONSTRAINT `operations_ibfk_1` FOREIGN KEY (`fk_entite`) REFERENCES `entites` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ope_sectors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_sectors` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int unsigned NOT NULL DEFAULT '0',
`libelle` varchar(75) NOT NULL DEFAULT '',
`sector` text NOT NULL DEFAULT '',
`color` varchar(7) NOT NULL DEFAULT '#4B77BE',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned NOT NULL DEFAULT '0',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned NOT NULL DEFAULT '0',
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `fk_operation` (`fk_operation`),
CONSTRAINT `ope_sectors_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `ope_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int unsigned NOT NULL DEFAULT '0',
`fk_user` int unsigned NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
CONSTRAINT `ope_users_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `ope_users_ibfk_2` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `email_queue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_queue` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_pass` int unsigned NOT NULL DEFAULT '0',
`to_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`body` text COLLATE utf8mb4_unicode_ci,
`headers` text COLLATE utf8mb4_unicode_ci,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`status` enum('pending','sent','failed') COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
`attempts` int unsigned DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ope_users_sectors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users_sectors` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int unsigned NOT NULL DEFAULT '0',
`fk_user` int unsigned NOT NULL DEFAULT '0',
`fk_sector` int unsigned NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned NOT NULL DEFAULT '0',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `fk_operation` (`fk_operation`),
KEY `fk_user` (`fk_user`),
KEY `fk_sector` (`fk_sector`),
CONSTRAINT `ope_users_sectors_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `ope_users_sectors_ibfk_2` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `ope_users_sectors_ibfk_3` FOREIGN KEY (`fk_sector`) REFERENCES `ope_sectors` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ope_users_suivis`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_users_suivis` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int unsigned NOT NULL DEFAULT '0',
`fk_user` int unsigned NOT NULL DEFAULT '0',
`date_suivi` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date du suivi',
`gps_lat` varchar(20) NOT NULL DEFAULT '',
`gps_lng` varchar(20) NOT NULL DEFAULT '',
`vitesse` varchar(20) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned NOT NULL DEFAULT '0',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sectors_adresses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sectors_adresses` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_adresse` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'adresses.cp??.id',
`osm_id` int unsigned NOT NULL DEFAULT '0',
`fk_sector` int unsigned NOT NULL DEFAULT '0',
`osm_name` varchar(50) NOT NULL DEFAULT '',
`numero` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`rue_bis` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`rue` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`cp` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`ville` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`gps_lat` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`gps_lng` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`osm_date_creat` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
PRIMARY KEY (`id`),
KEY `sectors_adresses_fk_sector_index` (`fk_sector`),
KEY `sectors_adresses_numero_index` (`numero`),
KEY `sectors_adresses_rue_index` (`rue`),
KEY `sectors_adresses_ville_index` (`ville`),
CONSTRAINT `sectors_adresses_ibfk_1` FOREIGN KEY (`fk_sector`) REFERENCES `ope_sectors` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `ope_pass`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_operation` int unsigned NOT NULL DEFAULT '0',
`fk_sector` int unsigned DEFAULT '0',
`fk_user` int unsigned NOT NULL DEFAULT '0',
`fk_adresse` varchar(25) DEFAULT '' COMMENT 'adresses.cp??.id',
`passed_at` timestamp NULL DEFAULT NULL COMMENT 'Date du passage',
`fk_type` int unsigned DEFAULT '0',
`numero` varchar(10) NOT NULL DEFAULT '',
`rue` varchar(75) NOT NULL DEFAULT '',
`rue_bis` varchar(1) NOT NULL DEFAULT '',
`ville` varchar(75) NOT NULL DEFAULT '',
`fk_habitat` int unsigned DEFAULT '1',
`appt` varchar(5) DEFAULT '',
`niveau` varchar(5) DEFAULT '',
`residence` varchar(75) DEFAULT '',
`gps_lat` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`gps_lng` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`libelle` varchar(45) NOT NULL DEFAULT '',
`montant` decimal(7,2) NOT NULL DEFAULT '0.00',
`fk_type_reglement` int unsigned DEFAULT '1',
`remarque` text DEFAULT '',
`email` varchar(75) DEFAULT '',
`nom_recu` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`date_recu` timestamp NULL DEFAULT NULL COMMENT 'Date de réception',
`date_creat_recu` timestamp NULL DEFAULT NULL COMMENT 'Date de création du reçu',
`date_sent_recu` timestamp NULL DEFAULT NULL COMMENT 'Date envoi du reçu',
`email_erreur` varchar(30) DEFAULT '',
`chk_email_sent` tinyint(1) unsigned NOT NULL DEFAULT '0',
`phone` varchar(15) NOT NULL DEFAULT '',
`docremis` tinyint(1) unsigned DEFAULT '0',
`date_repasser` timestamp NULL DEFAULT NULL COMMENT 'Date prévue pour repasser',
`nb_passages` int DEFAULT '1' COMMENT 'Nb passages pour les a repasser',
`chk_gps_maj` tinyint(1) unsigned DEFAULT '0',
`chk_map_create` tinyint(1) unsigned DEFAULT '0',
`chk_mobile` tinyint(1) unsigned DEFAULT '0',
`chk_synchro` tinyint(1) unsigned DEFAULT '1' COMMENT 'chk synchro entre web et appli',
`chk_api_adresse` tinyint(1) unsigned DEFAULT '0',
`chk_maj_adresse` tinyint(1) unsigned DEFAULT '0',
`anomalie` tinyint(1) unsigned DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
`fk_user_creat` int unsigned DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date de modification',
`fk_user_modif` int unsigned DEFAULT NULL,
`chk_active` tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `fk_operation` (`fk_operation`),
KEY `fk_sector` (`fk_sector`),
KEY `fk_user` (`fk_user`),
KEY `fk_type` (`fk_type`),
KEY `fk_type_reglement` (`fk_type_reglement`),
KEY `email` (`email`),
CONSTRAINT `ope_pass_ibfk_1` FOREIGN KEY (`fk_operation`) REFERENCES `operations` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `ope_pass_ibfk_2` FOREIGN KEY (`fk_sector`) REFERENCES `ope_sectors` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `ope_pass_ibfk_3` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT `ope_pass_ibfk_4` FOREIGN KEY (`fk_type_reglement`) REFERENCES `x_types_reglements` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ope_pass_histo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ope_pass_histo` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`fk_pass` int unsigned NOT NULL DEFAULT '0',
`fk_user` int unsigned NOT NULL DEFAULT '0',
`date_histo` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date historique',
`sujet` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`remarque` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `ope_pass_histo_fk_pass_IDX` (`fk_pass`) USING BTREE,
KEY `ope_pass_histo_date_histo_IDX` (`date_histo`) USING BTREE,
CONSTRAINT `ope_pass_histo_ibfk_1` FOREIGN KEY (`fk_pass`) REFERENCES `ope_pass` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ope_pass_histo_ibfk_2` FOREIGN KEY (`fk_user`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `medias`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `medias` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`support` varchar(45) NOT NULL DEFAULT '',
`support_id` int unsigned NOT NULL DEFAULT '0',
`fichier` varchar(250) NOT NULL DEFAULT '',
`description` varchar(100) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`fk_user_creat` int unsigned NOT NULL DEFAULT '0',
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`fk_user_modif` int unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-- Création des tables pour le système de chat
DROP TABLE IF EXISTS `chat_rooms`;
-- Table des salles de discussion
CREATE TABLE chat_rooms (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
type ENUM('privee', 'groupe', 'liste_diffusion') NOT NULL,
date_creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
fk_user INT UNSIGNED NOT NULL,
fk_entite INT UNSIGNED,
statut ENUM('active', 'archive') NOT NULL DEFAULT 'active',
description TEXT,
INDEX idx_user (fk_user),
INDEX idx_entite (fk_entite)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `chat_participants`;
-- Table des participants aux salles de discussion
CREATE TABLE chat_participants (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
id_room INT UNSIGNED NOT NULL,
id_user INT UNSIGNED NOT NULL,
role ENUM('administrateur', 'participant', 'en_lecture_seule') NOT NULL DEFAULT 'participant',
date_ajout timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date ajout',
notification_activee BOOLEAN NOT NULL DEFAULT TRUE,
INDEX idx_room (id_room),
INDEX idx_user (id_user),
CONSTRAINT uc_room_user UNIQUE (id_room, id_user),
FOREIGN KEY (id_room) REFERENCES chat_rooms(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `chat_messages`;
-- Table des messages
CREATE TABLE chat_messages (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fk_room INT UNSIGNED NOT NULL,
fk_user INT UNSIGNED NOT NULL,
content TEXT,
date_sent timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date envoi',
type ENUM('texte', 'media', 'systeme') NOT NULL DEFAULT 'texte',
statut ENUM('envoye', 'livre', 'lu') NOT NULL DEFAULT 'envoye',
INDEX idx_room (fk_room),
INDEX idx_user (fk_user),
INDEX idx_date (date_sent),
FOREIGN KEY (fk_room) REFERENCES chat_rooms(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `chat_listes_diffusion`;
-- Table des listes de diffusion
CREATE TABLE chat_listes_diffusion (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fk_room INT UNSIGNED NOT NULL,
name VARCHAR(100) NOT NULL,
description TEXT,
fk_user INT UNSIGNED NOT NULL,
date_creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
INDEX idx_room (fk_room),
INDEX idx_user (fk_user),
FOREIGN KEY (fk_room) REFERENCES chat_rooms(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `chat_read_messages`;
-- Table pour suivre la lecture des messages
CREATE TABLE chat_read_messages (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fk_message INT UNSIGNED NOT NULL,
fk_user INT UNSIGNED NOT NULL,
date_read timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de lecture',
INDEX idx_message (fk_message),
INDEX idx_user (fk_user),
CONSTRAINT uc_message_user UNIQUE (fk_message, fk_user),
FOREIGN KEY (fk_message) REFERENCES chat_messages(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `chat_notifications`;
-- Table des notifications
CREATE TABLE chat_notifications (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fk_user INT UNSIGNED NOT NULL,
fk_message INT UNSIGNED,
fk_room INT UNSIGNED,
type VARCHAR(50) NOT NULL,
contenu TEXT,
date_creation timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date de création',
date_lecture timestamp NULL DEFAULT NULL COMMENT 'Date de lecture',
statut ENUM('non_lue', 'lue') NOT NULL DEFAULT 'non_lue',
INDEX idx_user (fk_user),
INDEX idx_message (fk_message),
INDEX idx_room (fk_room),
FOREIGN KEY (fk_message) REFERENCES chat_messages(id) ON DELETE SET NULL,
FOREIGN KEY (fk_room) REFERENCES chat_rooms(id) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `z_params`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `params` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`libelle` varchar(35) NOT NULL DEFAULT '',
`valeur` varchar(255) NOT NULL DEFAULT '',
`aide` varchar(150) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `z_sessions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `z_sessions` (
`sid` text NOT NULL,
`fk_user` int NOT NULL,
`role` varchar(10) DEFAULT NULL,
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ip` varchar(50) NOT NULL,
`browser` varchar(150) NOT NULL,
`data` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@@ -18,6 +18,7 @@ Ce document explique comment les boîtes Hive sont gérées dans l'application G
Hive est une base de données NoSQL légère et rapide utilisée dans GeoSector pour stocker les données localement. Les données sont organisées en "boîtes" (boxes) qui peuvent être typées pour stocker des modèles spécifiques.
Dans cette application, Hive est utilisé pour :
- Stocker les données utilisateur et maintenir les sessions
- Conserver les données des opérations, secteurs et passages
- Permettre l'utilisation de l'application en mode hors ligne
@@ -36,6 +37,7 @@ static const String settingsBoxName = 'settings';
```
Chaque boîte stocke un type spécifique de données :
- **users** : Stocke les informations des utilisateurs (`UserModel`)
- **operations** : Stocke les opérations (`OperationModel`)
- **sectors** : Stocke les secteurs (`SectorModel`)
@@ -106,10 +108,16 @@ await Hive.openBox(AppKeys.settingsBoxName); // Préférences générales
### UserRepository
Le `UserRepository` est le principal gestionnaire des boîtes Hive. Il est responsable de :
Le `UserRepository` est le principal gestionnaire des boîtes Hive et de l'authentification. Il est responsable de :
- L'initialisation des boîtes au démarrage de l'application
- La gestion des boîtes pendant les processus de connexion et déconnexion
- Le nettoyage et la recréation des boîtes lorsque nécessaire
- La gestion complète de l'authentification (connexion et déconnexion)
- L'affichage des overlays de chargement pendant les opérations d'authentification
- La redirection vers les pages appropriées après connexion/déconnexion
> **Note importante** : Auparavant, l'application utilisait un service séparé `AuthService` pour gérer l'authentification. Cette classe a été supprimée et ses fonctionnalités ont été intégrées directement dans `UserRepository` pour simplifier l'architecture et éviter les problèmes de synchronisation entre les deux classes.
### Autres repositories spécialisés
@@ -124,14 +132,17 @@ Ces repositories sont injectés dans le `UserRepository` pour traiter les donné
Le processus de connexion dans `UserRepository.login()` suit ces étapes :
1. **Nettoyage initial** :
- Suppression des boîtes non référencées (`auth`, `locations`, `messages`)
- Nettoyage adapté à la plateforme (Web, iOS, Android)
2. **Préparation des boîtes** :
- Appel à `_clearAndRecreateBoxes()` pour vider et recréer les boîtes sans les fermer
- Utilisation de `_ensureBoxIsOpen()` pour garantir que les boîtes sont ouvertes
3. **Appel API et traitement des données** :
- Connexion via l'API
- Vérification que toutes les boîtes sont ouvertes avant le traitement
- Traitement des données reçues (opérations, secteurs, passages)
@@ -159,34 +170,93 @@ await _processPassages(passagesData);
Le processus de déconnexion dans `UserRepository.logout()` suit ces étapes :
1. **Préparation** :
- S'assurer que la boîte des utilisateurs est ouverte
- Suppression des boîtes non référencées
2. **Gestion de l'utilisateur** :
- Récupération de l'utilisateur actuel avant nettoyage
- Déconnexion de la session API
- Mise à jour de l'utilisateur pour effacer les données de session
- Réinitialisation du cache de l'utilisateur actuel
3. **Nettoyage des données** :
- Nettoyage adapté à la plateforme (Web, iOS, Android)
- Appel à `_clearAndRecreateBoxes()` pour vider les boîtes sans les fermer
2. **Nettoyage des données** :
- Appel à `_deepCleanHiveBoxes()` pour un nettoyage complet des boîtes Hive
### Méthode \_deepCleanHiveBoxes
La méthode `_deepCleanHiveBoxes()` est cruciale pour le processus de déconnexion et suit ces étapes :
1. **Vidage des boîtes** :
- Vidage de toutes les boîtes Hive ouvertes sans les fermer
- Gestion des erreurs pour chaque boîte avec typage spécifique
2. **Nettoyage spécifique à la plateforme** :
- Nettoyage adapté selon la plateforme (Web, iOS, Android)
- Utilisation de méthodes spécifiques comme `_clearIndexedDB()` pour le web
3. **Réinitialisation** :
- Réinitialisation de l'API Service
### Code clé pour la déconnexion
```dart
// S'assurer que la boîte des utilisateurs est ouverte
await _ensureBoxIsOpen(AppKeys.usersBoxName);
// Méthode logout
Future<bool> logout() async {
try {
// Récupérer l'utilisateur actuel avant de nettoyer les données
final currentUser = getCurrentUser();
// Récupérer l'utilisateur et effacer sa session
final updatedUser = currentUser.copyWith(
sessionId: null,
sessionExpiry: null,
lastPath: null
);
await saveUser(updatedUser);
// Déconnecter la session API
if (currentUser?.sessionId != null) {
await logoutAPI();
}
// Vider les boîtes sans les fermer
await _clearAndRecreateBoxes();
// Supprimer la session API
setSessionId(null);
// Réinitialiser le cache de l'utilisateur actuel
_cachedCurrentUser = null;
// Nettoyage complet des boîtes Hive
await _deepCleanHiveBoxes();
return true;
} catch (e) {
return false;
}
}
// Méthode de nettoyage des boîtes Hive
Future<void> _deepCleanHiveBoxes() async {
try {
// 1. Vider toutes les boîtes sans les fermer
if (Hive.isBoxOpen(AppKeys.usersBoxName)) {
await Hive.box<UserModel>(AppKeys.usersBoxName).clear();
}
if (Hive.isBoxOpen(AppKeys.operationsBoxName)) {
await Hive.box<OperationModel>(AppKeys.operationsBoxName).clear();
}
if (Hive.isBoxOpen(AppKeys.sectorsBoxName)) {
await Hive.box<SectorModel>(AppKeys.sectorsBoxName).clear();
}
// Vider les autres boîtes...
// 2. Nettoyage spécifique à la plateforme
if (kIsWeb) {
await _clearIndexedDB();
} else if (Platform.isIOS) {
await _cleanHiveFilesOnIOS();
} else if (Platform.isAndroid) {
await _cleanHiveFilesOnAndroid();
}
// 3. Réinitialiser l'API Service
_apiService.setSessionId(null);
} catch (e) {
debugPrint('Erreur lors du nettoyage des boîtes Hive: $e');
}
}
```
## Problèmes connus et solutions
@@ -201,7 +271,8 @@ await _clearAndRecreateBoxes();
**Problème** : Des erreurs se produisent lorsqu'on tente d'accéder à une boîte qui a été fermée prématurément.
**Solution** :
**Solution** :
- Utiliser la méthode `_ensureBoxIsOpen()` avant d'accéder à une boîte
- Éviter de fermer les boîtes qui pourraient être utilisées plus tard
- Préférer `box.clear()` à `box.close()` pour vider les données sans fermer la boîte
@@ -217,11 +288,13 @@ await _clearAndRecreateBoxes();
### Initialisation à la demande
1. **Initialiser les boîtes uniquement lorsqu'elles sont nécessaires** :
- N'ouvrir que les boîtes `users` et `settings` au démarrage
- Initialiser les autres boîtes après connexion réussie
- Utiliser `_ensureBoxIsOpen()` avant chaque accès à une boîte
2. **Centraliser la gestion des boîtes** :
- Créer un service dédié à la gestion des boîtes Hive
- Utiliser des méthodes comme `openRequiredBoxes()` et `clearAllBoxes()`
@@ -232,10 +305,12 @@ await _clearAndRecreateBoxes();
### Éviter l'erreur "Box has already been closed"
1. **Ne jamais fermer une boîte qui pourrait être utilisée plus tard** :
- Utiliser `_ensureBoxIsOpen()` au lieu de fermer et rouvrir les boîtes
- Vider les boîtes avec `box.clear()` au lieu de les fermer
2. **Vérifier qu'une boîte est ouverte avant de l'utiliser** :
```dart
if (!Hive.isBoxOpen(boxName)) {
await Hive.openBox<T>(boxName);
@@ -246,7 +321,7 @@ await _clearAndRecreateBoxes();
- Toujours entourer les opérations Hive de blocs try/catch
- Prévoir des mécanismes de récupération en cas d'erreur
### Méthode utilitaire _ensureBoxIsOpen
### Méthode utilitaire \_ensureBoxIsOpen
Cette méthode est cruciale pour garantir qu'une boîte est ouverte avant de l'utiliser :

115
docs/nginx-dva-geo.conf Normal file
View File

@@ -0,0 +1,115 @@
server {
listen 80;
server_name dev.geosector.fr;
root /var/www/geosector/web;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# Configuration pour les assets statiques (optionnel)
location /assets/ {
expires 1y;
add_header Cache-Control "public";
}
}
server {
listen 80;
server_name dapp.geosector.fr;
# Logs globales
access_log /var/log/nginx/geosector-app_access.log;
error_log /var/log/nginx/geosector-app_error.log;
set $current_host $host;
# Application Flutter (contenu statique)
location / {
root /var/www/geosector/app;
index index.html;
try_files $uri $uri/ /index.html;
# Configuration pour les assets Flutter
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires off;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate" always;
add_header Pragma "no-cache" always;
}
}
# API PHP
location /api/ {
# alias /var/www/geosector/api/public/;
add_header X-Debug-Host $current_host;
# Gestion CORS pour les requêtes OPTIONS
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' $http_origin always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
# En-têtes CORS pour les requêtes normales
add_header 'Access-Control-Allow-Origin' $http_origin always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
# Désactiver le cache pour le développement
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
# Configuration conditionnelle pour l'origine
if ($http_origin ~ '^http://(dapp\.geosector\.fr)$') {
set $cors "true";
}
if ($cors = "false") {
return 403;
}
# Traitement normal pour les autres méthodes
try_files $uri $uri/ /api/index.php$is_args$args;
# Gestion PHP pour l'API (ajusté pour fonctionner avec alias)
location ~ ^/api/(.+\.php)$ {
# alias /var/www/geosector/api/public/$1;
fastcgi_pass unix:/run/php-fpm83/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
# Variable d'environnement
fastcgi_param APP_ENV "dev"; # À ajuster selon l'environnement
# Transmission des headers personnalisés à PHP
fastcgi_param HTTP_X_APP_IDENTIFIER "dapp.geosector.fr";
fastcgi_param HTTP_X_REAL_IP $remote_addr;
# Augmenter les timeouts pour les opérations de synchronisation
fastcgi_read_timeout 300;
fastcgi_send_timeout 300;
# En-têtes CORS pour les réponses PHP
add_header 'Access-Control-Allow-Origin' $http_origin always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
}
}
# Protection des fichiers système
location ~ /\.(?!well-known) {
deny all;
}
}

View File

@@ -0,0 +1,32 @@
title,description,labels,due_date
"GEO - Développement de la page Communication pour les utilisateurs","Implémentation du widget de chat pour la communication d'équipe. Création de l'interface pour répondre aux mails clients. Intégration avec les repositories pour la gestion des données.","agenda,planning",01/05/2025
"GEO - Finalisation Widget Carte MapBox (partie utilisateur)","Développement des fonctionnalités de visualisation des secteurs d'activité, visualisation des passages, sélection de passages près de la position et création de passage sur clic. Implémentation de la détection de la position utilisateur.","agenda,planning",03/05/2025
"GEO - Formulaire de passage avec intégration Stripe (partie 1)","Conception du widget Formulaire de passage. Implémentation des champs et validations. Mise en place de la logique de collecte des données. Préparation pour l'intégration de Stripe.","agenda,planning",05/05/2025
"GEO - Formulaire de passage avec intégration Stripe (partie 2)","Intégration de Stripe pour le paiement en ligne. Configuration du client Stripe dans Flutter. Gestion des paiements et des erreurs. Tests des transactions.","agenda,planning",07/05/2025
"GEO - Développement du système d'envoi de reçus PDF par email et SMS","Mise en place de la génération de reçu au format PDF. Intégration avec le service d'emails. Configuration de l'envoi de SMS via l'API OVH. Tests des envois.","agenda,planning",09/05/2025
"GEO - Implémentation des widgets statistiques communs","Développement des widgets de graphiques (passages, règlements). Implémentation du filtrage par période (jour/semaine/mois). Configuration de l'affichage responsive.","agenda,planning",11/05/2025
"GEO - Développement de la page Admin - Principale","Création de la page principale d'administration avec synthèse des passages par secteur et utilisateur. Implémentation du graphique des passages des deux dernières semaines.","agenda,planning",13/05/2025
"GEO - Développement de la page Admin - Amicale","Implémentation du formulaire d'informations de l'amicale. Upload de logo. Gestion des abonnements avec l'intégration STRIPE. Configuration des packs SMS.","agenda,planning",15/05/2025
"GEO - Développement de la page Admin - Membres","Création de l'interface de gestion des membres. Upload des badges. Fonctionnalités d'import/export de listes. Gestion de réinitialisation des mots de passe.","agenda,planning",17/05/2025
"GEO - Développement de la page Admin - Communication","Implémentation du système de chat pour l'équipe. Intégration avec l'API pour la communication avec Geosector. Tests de communication.","agenda,planning",19/05/2025
"GEO - Développement de la page Admin - Connexions","Création de l'interface de consultation des connexions. Implémentation du graphique sur 5 mois. Filtrage par membre. Optimisation des requêtes API.","agenda,planning",21/05/2025
"GEO - Développement de la page Admin - Opérations (partie 1)","Conception de l'interface de gestion des opérations. Implémentation de la sélection de l'opération active. Gestion des secteurs (couleurs, titres, membres).","agenda,planning",23/05/2025
"GEO - Développement de la page Admin - Opérations (partie 2)","Développement de l'interface pour tracer les secteurs sur la carte. Affichage des passages selon l'historique. Intégration avec les modules existants.","agenda,planning",25/05/2025
"GEO - Développement de la page Admin - Opérations (partie 3)","Implémentation de l'affichage des membres actifs avec leurs statistiques. Exportation des données au format Excel. Tests d'intégration complets.","agenda,planning",27/05/2025
"GEO - Développement de la page Admin - Statistiques","Création des graphiques d'activité par secteur, par membre et par période. Implémentation des filtres dynamiques. Tests et optimisation des performances.","agenda,planning",29/05/2025
"GEO - Développement de la page Admin - Clients (Super Admin)","Implémentation de la liste des amicales avec recherche. Gestion des amicales en démo. Interface de création/suppression d'amicales. Consultation des statistiques.","agenda,planning",31/05/2025
"GEO - Développement des scripts d'importation de données Open Data (partie 1)","Conception et développement des scripts PHP pour l'importation hebdomadaire de la base ADRESSES et SIRENE. Configuration des tâches planifiées. Tests d'importation.","agenda,planning",02/06/2025
"GEO - Développement des scripts d'importation de données Open Data (partie 2)","Conception et développement des scripts PHP pour l'importation hebdomadaire de la base BATIMENTS et OpenStreetMap. Optimisation des requêtes SQL. Tests d'intégration.","agenda,planning",04/06/2025
"GEO - Implémentation du système de chiffrement des données sensibles","Configuration du chiffrement des mots de passe avec Argon2. Mise en place du chiffrement AES-256 pour les données sensibles. Tests de sécurité.","agenda,planning",06/06/2025
"GEO - Développement du système de gestion des emails et file d'attente","Implémentation de la queue des emails en base de données. Création du script de traitement de la queue. Développement du système de gestion des retours d'emails.","agenda,planning",08/06/2025
"GEO - Développement du système de gestion des SMS via OVH","Configuration de l'intégration avec l'API SMS OVH. Implémentation de la gestion des packs SMS. Tests d'envoi et de réception de SMS.","agenda,planning",10/06/2025
"GEO - Création du site vitrine Svelte (partie 1)","Configuration initiale du projet Svelte. Développement de la page d'accueil avec présentation de la solution. Conception des composants de base.","agenda,planning",12/06/2025
"GEO - Création du site vitrine Svelte (partie 2)","Développement des sections de présentation des fonctionnalités. Implémentation du lien vers l'App Store et Play Store. Intégration des captures d'écran.","agenda,planning",14/06/2025
"GEO - Création du site vitrine Svelte (partie 3)","Implémentation du formulaire de contact. Développement des pages légales (mentions légales, conditions d'utilisation). Mise en place de la gestion des cookies.","agenda,planning",16/06/2025
"GEO - Intégration de l'authentification et des liens entre site vitrine et application","Développement des liens entre le site vitrine et l'application Flutter. Configuration du formulaire de connexion et d'inscription. Tests d'intégration.","agenda,planning",18/06/2025
"GEO - Tests utilisateurs et débogage global (partie 1)","Procédure de tests utilisateur sur les fonctionnalités principales. Identification et correction des bugs. Améliorations de l'interface utilisateur.","agenda,planning",20/06/2025
"GEO - Tests utilisateurs et débogage global (partie 2)","Tests des parcours utilisateurs complexes. Vérification de la synchronisation des données. Optimisation des performances. Corrections de bugs.","agenda,planning",22/06/2025
"GEO - Optimisation des performances et de la taille de l'application","Analyse des performances. Optimisation du code Flutter. Réduction de la taille de l'application. Amélioration des temps de chargement.","agenda,planning",24/06/2025
"GEO - Documentation technique et guide utilisateur","Rédaction de la documentation technique détaillée. Création du guide utilisateur avec captures d'écran. Préparation des ressources pour la formation.","agenda,planning",26/06/2025
"GEO - Préparation du déploiement et configuration des environnements","Configuration des environnements de production. Préparation du déploiement sur les stores (AppStore, PlayStore). Configuration du serveur web et de la base de données.","agenda,planning",28/06/2025
"GEO - Finalisation et préparation au lancement","Derniers tests d'intégration. Vérification des configurations de sécurité. Préparation des scripts de déploiement. Planification du lancement.","agenda,planning",30/06/2025
1 title description labels due_date
2 GEO - Développement de la page Communication pour les utilisateurs Implémentation du widget de chat pour la communication d'équipe. Création de l'interface pour répondre aux mails clients. Intégration avec les repositories pour la gestion des données. agenda,planning 01/05/2025
3 GEO - Finalisation Widget Carte MapBox (partie utilisateur) Développement des fonctionnalités de visualisation des secteurs d'activité, visualisation des passages, sélection de passages près de la position et création de passage sur clic. Implémentation de la détection de la position utilisateur. agenda,planning 03/05/2025
4 GEO - Formulaire de passage avec intégration Stripe (partie 1) Conception du widget Formulaire de passage. Implémentation des champs et validations. Mise en place de la logique de collecte des données. Préparation pour l'intégration de Stripe. agenda,planning 05/05/2025
5 GEO - Formulaire de passage avec intégration Stripe (partie 2) Intégration de Stripe pour le paiement en ligne. Configuration du client Stripe dans Flutter. Gestion des paiements et des erreurs. Tests des transactions. agenda,planning 07/05/2025
6 GEO - Développement du système d'envoi de reçus PDF par email et SMS Mise en place de la génération de reçu au format PDF. Intégration avec le service d'emails. Configuration de l'envoi de SMS via l'API OVH. Tests des envois. agenda,planning 09/05/2025
7 GEO - Implémentation des widgets statistiques communs Développement des widgets de graphiques (passages, règlements). Implémentation du filtrage par période (jour/semaine/mois). Configuration de l'affichage responsive. agenda,planning 11/05/2025
8 GEO - Développement de la page Admin - Principale Création de la page principale d'administration avec synthèse des passages par secteur et utilisateur. Implémentation du graphique des passages des deux dernières semaines. agenda,planning 13/05/2025
9 GEO - Développement de la page Admin - Amicale Implémentation du formulaire d'informations de l'amicale. Upload de logo. Gestion des abonnements avec l'intégration STRIPE. Configuration des packs SMS. agenda,planning 15/05/2025
10 GEO - Développement de la page Admin - Membres Création de l'interface de gestion des membres. Upload des badges. Fonctionnalités d'import/export de listes. Gestion de réinitialisation des mots de passe. agenda,planning 17/05/2025
11 GEO - Développement de la page Admin - Communication Implémentation du système de chat pour l'équipe. Intégration avec l'API pour la communication avec Geosector. Tests de communication. agenda,planning 19/05/2025
12 GEO - Développement de la page Admin - Connexions Création de l'interface de consultation des connexions. Implémentation du graphique sur 5 mois. Filtrage par membre. Optimisation des requêtes API. agenda,planning 21/05/2025
13 GEO - Développement de la page Admin - Opérations (partie 1) Conception de l'interface de gestion des opérations. Implémentation de la sélection de l'opération active. Gestion des secteurs (couleurs, titres, membres). agenda,planning 23/05/2025
14 GEO - Développement de la page Admin - Opérations (partie 2) Développement de l'interface pour tracer les secteurs sur la carte. Affichage des passages selon l'historique. Intégration avec les modules existants. agenda,planning 25/05/2025
15 GEO - Développement de la page Admin - Opérations (partie 3) Implémentation de l'affichage des membres actifs avec leurs statistiques. Exportation des données au format Excel. Tests d'intégration complets. agenda,planning 27/05/2025
16 GEO - Développement de la page Admin - Statistiques Création des graphiques d'activité par secteur, par membre et par période. Implémentation des filtres dynamiques. Tests et optimisation des performances. agenda,planning 29/05/2025
17 GEO - Développement de la page Admin - Clients (Super Admin) Implémentation de la liste des amicales avec recherche. Gestion des amicales en démo. Interface de création/suppression d'amicales. Consultation des statistiques. agenda,planning 31/05/2025
18 GEO - Développement des scripts d'importation de données Open Data (partie 1) Conception et développement des scripts PHP pour l'importation hebdomadaire de la base ADRESSES et SIRENE. Configuration des tâches planifiées. Tests d'importation. agenda,planning 02/06/2025
19 GEO - Développement des scripts d'importation de données Open Data (partie 2) Conception et développement des scripts PHP pour l'importation hebdomadaire de la base BATIMENTS et OpenStreetMap. Optimisation des requêtes SQL. Tests d'intégration. agenda,planning 04/06/2025
20 GEO - Implémentation du système de chiffrement des données sensibles Configuration du chiffrement des mots de passe avec Argon2. Mise en place du chiffrement AES-256 pour les données sensibles. Tests de sécurité. agenda,planning 06/06/2025
21 GEO - Développement du système de gestion des emails et file d'attente Implémentation de la queue des emails en base de données. Création du script de traitement de la queue. Développement du système de gestion des retours d'emails. agenda,planning 08/06/2025
22 GEO - Développement du système de gestion des SMS via OVH Configuration de l'intégration avec l'API SMS OVH. Implémentation de la gestion des packs SMS. Tests d'envoi et de réception de SMS. agenda,planning 10/06/2025
23 GEO - Création du site vitrine Svelte (partie 1) Configuration initiale du projet Svelte. Développement de la page d'accueil avec présentation de la solution. Conception des composants de base. agenda,planning 12/06/2025
24 GEO - Création du site vitrine Svelte (partie 2) Développement des sections de présentation des fonctionnalités. Implémentation du lien vers l'App Store et Play Store. Intégration des captures d'écran. agenda,planning 14/06/2025
25 GEO - Création du site vitrine Svelte (partie 3) Implémentation du formulaire de contact. Développement des pages légales (mentions légales, conditions d'utilisation). Mise en place de la gestion des cookies. agenda,planning 16/06/2025
26 GEO - Intégration de l'authentification et des liens entre site vitrine et application Développement des liens entre le site vitrine et l'application Flutter. Configuration du formulaire de connexion et d'inscription. Tests d'intégration. agenda,planning 18/06/2025
27 GEO - Tests utilisateurs et débogage global (partie 1) Procédure de tests utilisateur sur les fonctionnalités principales. Identification et correction des bugs. Améliorations de l'interface utilisateur. agenda,planning 20/06/2025
28 GEO - Tests utilisateurs et débogage global (partie 2) Tests des parcours utilisateurs complexes. Vérification de la synchronisation des données. Optimisation des performances. Corrections de bugs. agenda,planning 22/06/2025
29 GEO - Optimisation des performances et de la taille de l'application Analyse des performances. Optimisation du code Flutter. Réduction de la taille de l'application. Amélioration des temps de chargement. agenda,planning 24/06/2025
30 GEO - Documentation technique et guide utilisateur Rédaction de la documentation technique détaillée. Création du guide utilisateur avec captures d'écran. Préparation des ressources pour la formation. agenda,planning 26/06/2025
31 GEO - Préparation du déploiement et configuration des environnements Configuration des environnements de production. Préparation du déploiement sur les stores (AppStore, PlayStore). Configuration du serveur web et de la base de données. agenda,planning 28/06/2025
32 GEO - Finalisation et préparation au lancement Derniers tests d'intégration. Vérification des configurations de sécurité. Préparation des scripts de déploiement. Planification du lancement. agenda,planning 30/06/2025