--
-- Host: localhost    Database: sigmat_api_db
-- ------------------------------------------------------


--
-- Table structure for table `administrative_supervisions`
--

CREATE TABLE `administrative_supervisions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `admin_super_id` bigint unsigned DEFAULT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abbreviation` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_super_id` (`admin_super_id`),
  CONSTRAINT `administrative_supervisions_admin_super_id_foreign` FOREIGN KEY (`admin_super_id`) REFERENCES `administrative_supervisions` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `administrative_supervisions`
--

INSERT INTO `administrative_supervisions` VALUES (1,NULL,'11','PRESIDENCE DE LA REPUBLIQUE','PDLR','2025-01-13 14:42:53','2025-01-13 14:42:53'),(2,NULL,'15','PRIMATURE','P','2025-01-13 14:42:53','2025-01-13 14:42:53'),(3,NULL,'12','SENAT','S','2025-01-13 14:42:53','2025-01-13 14:42:53'),(4,NULL,'13','ASSEMBLEE NATIONALE','AN','2025-01-13 14:42:53','2025-01-13 14:42:53'),(5,NULL,'16','COUR CONSTITUTIONNELLE','CC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(6,NULL,'14','CONSEIL D\'ETAT','CE','2025-01-13 14:42:53','2025-01-13 14:42:53'),(7,NULL,'28','CONSEIL NATIONAL DE LA DEMOCRATIE','CNDLD','2025-01-13 14:42:53','2025-01-13 14:42:53'),(8,NULL,'26','CONSEIL ECONOMIQUE ET SOCIAL','CEES','2025-01-13 14:42:53','2025-01-13 14:42:53'),(9,NULL,'30','MINISTERE DE LA DEFENSE NATIONALE','MDLDN','2025-01-13 14:42:53','2025-01-13 14:42:53'),(10,NULL,'42','MINISTERE DE L\'INTERIEUR','MDI','2025-01-13 14:42:53','2025-01-13 14:42:53'),(11,NULL,'25','MINISTERE DES AFFAIRES ETRANGERES','MDAE','2025-01-13 14:42:53','2025-01-13 14:42:53'),(12,NULL,'53','MINISTERE DE L\'ECONOMIE ET LA RELANCE','MDEELR','2025-01-13 14:42:53','2025-01-13 14:42:53'),(13,NULL,'51','MINISTERE BUDGET ET COMPTES PUBLICS','MBECP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(14,NULL,'66','MINISTERE DU PETROLE ET GAZ','MDPEG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(15,NULL,'66','MINISTERE DES MINES ET GEOLOGIE','MDMEG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(16,NULL,'62','MINISTERE DES EAUX ET FORETS','MDEEF','2025-01-13 14:42:53','2025-01-13 14:42:53'),(17,NULL,'54','MINISTERE DE DEVELOPPEMENT INDUSTRIEL','MDDI','2025-01-13 14:42:53','2025-01-13 14:42:53'),(18,NULL,'61','MINISTERE DE L\'AGRICULTURE','MDA','2025-01-13 14:42:53','2025-01-13 14:42:53'),(19,NULL,'67','MINISTERE DE L\'ENERGIE ET RESSOURCES HYDRAULIQUES','MDEERH','2025-01-13 14:42:53','2025-01-13 14:42:53'),(20,NULL,'71','MINISTERE DES TRANSPORTS','MDT','2025-01-13 14:42:53','2025-01-13 14:42:53'),(21,NULL,'64','MINISTERE DES TRAVAUX PUBLICS','MDTP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(22,NULL,'64','MINISTERE DE PROMOTION DES INVESTIMENTS','MDPDI','2025-01-13 14:42:53','2025-01-13 14:42:53'),(23,NULL,'55','MINISTERE DU COMMERCE','MDC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(24,NULL,'61','MINISTERE DE LA PECHE','MDLP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(25,NULL,'91','MINISTERE DE LA SANTE','MDLS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(26,NULL,'93','MINISTERE DES AFFAIRES SOCIALES','MDAS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(27,NULL,'83','MINISTERE DE LA JEUNESSE ET SPORTS','MDLJES','2025-01-13 14:42:53','2025-01-13 14:42:53'),(28,NULL,'56','MINISTERE DU TOURISME','MDT','2025-01-13 14:42:53','2025-01-13 14:42:53'),(29,NULL,'85','MINISTERE DE LA CULTURE ET ARTS','MDLCEA','2025-01-13 14:42:53','2025-01-13 14:42:53'),(30,NULL,'41','MINISTERE D\'EMPLOI, FONCTION PUBLIQUE ET TRAVAIL','MEFPET','2025-01-13 14:42:53','2025-01-13 14:42:53'),(31,NULL,'65','MINISTERE DE L\'HABITAT ET L\'URBANISME','MDHEU','2025-01-13 14:42:53','2025-01-13 14:42:53'),(32,NULL,'81','MINISTERE DE L\'EDUCATION NATIONALE, CHARGE DE LA FORMATION  CIVIQUE','MDENCDLFC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(33,NULL,'82','MINISTERE DE LA FORMATION PROFESSIONNELLE','MDLFP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(34,NULL,'84','MINISTERE DE L\'ENSEIGNEMENT SUPERIEUR','MDES','2025-01-13 14:42:53','2025-01-13 14:42:53'),(35,NULL,'22','MINISTERE DE LA JUSTICE,  GARDE DES SCEAUX','MDLJGDS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(36,NULL,'68','MINISTERE DE LA DECENTRALISATION','MDLD','2025-01-13 14:42:53','2025-01-13 14:42:53'),(37,NULL,'29','MINISTERE DE PROMOTION DE LA BONNE GOUVERNANCE','MDPDLBG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(38,NULL,'21','MINISTERE DES RELATIONS AVEC LES INSTITUTIONS','MDRALI','2025-01-13 14:42:53','2025-01-13 14:42:53'),(39,NULL,'0','MINISTERE DE LA CONSOMMATION','MDLC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(40,NULL,'43','MINISTERE DE L\'ECONOMIE NUMERIQUE','MDEN','2025-01-13 14:42:53','2025-01-13 14:42:53'),(41,NULL,'43','MINISTERE DE LA COMMUNICATION','MDLC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(42,NULL,'0','MINISTERE DU BATIMENT INTERMINISTRIEL','MDBI','2025-01-13 14:42:53','2025-01-13 14:42:53'),(43,NULL,'46','CENTRE GABONAIS DES ELECTIONS','CGDE','2025-01-13 14:42:53','2025-01-13 14:42:53'),(44,13,'75','INSPECTION GENRALES DES SERVICES','IGDS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(45,13,'63','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(46,45,'24','PÔLES TECHNIQUES','PT','2025-01-13 14:42:53','2025-01-13 14:42:53'),(47,45,'39','UNITES D\'APPUIS','UA','2025-01-13 14:42:53','2025-01-13 14:42:53'),(48,46,'38','DIRECTIONS CENTRALES','DC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(49,46,'98','DIRECTIONS GENERALES','DG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(50,46,'98','SERVICE D\'APPUI','SA','2025-01-13 14:42:53','2025-01-13 14:42:53'),(51,35,'48','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(52,35,'50','CABINET DU MINISTRE','CDM','2025-01-13 14:42:53','2025-01-13 14:42:53'),(53,51,'4','DIRECTION GENERALE DES AFFAIRES JUDICIAIRES','DGDAJ','2025-01-13 14:42:53','2025-01-13 14:42:53'),(54,51,'92','DIRECTION GENERALES DES PERSONNELS','DGDP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(55,52,'87','INSPECTION GENRALES DES SERVICES JUDICIAIRES','IGDSJ','2025-01-13 14:42:53','2025-01-13 14:42:53'),(56,52,'5','SERVICE DU COURRIER CENTRAL','SDCC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(57,34,'61','CABINET DU MINISTRE','CDM','2025-01-13 14:42:53','2025-01-13 14:42:53'),(58,34,'16','INSPECTION GENERALE','IG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(59,34,'29','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(60,59,'31','DIRECTION CENTRALE DES AFFAIRES FINANCIERES','DCDAF','2025-01-13 14:42:53','2025-01-13 14:42:53'),(61,59,'66','DIRECTION DE LA RECHERCHE SCIENTIFIQUE','DDLRS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(62,59,'0','DIRECTION CENTRALE DES PERSONNELS','DCDP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(63,41,'25','CABINET DU MINISTRE','CDM','2025-01-13 14:42:53','2025-01-13 14:42:53'),(64,41,'35','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(65,64,'72','DIRECTION GENERALE DE LA POSTE','DGDLP','2025-01-13 14:42:53','2025-01-13 14:42:53'),(66,64,'92','DIRECTION GENERALE DES RESEAUX ET DEVELOPPEMENT NUMERIQUE','DGDREDN','2025-01-13 14:42:53','2025-01-13 14:42:53'),(67,40,'41','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(68,40,'83','INSPECTION GENERALE DES SERVICES','IGDS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(69,67,'96','DIRECTION GENERALE DE LA PROMOTION ET D L\'ECONOMIE NUMERIQUE','DGDLPEDEN','2025-01-13 14:42:53','2025-01-13 14:42:53'),(70,67,'39','DIRECTION GENERALE DU DEVELOPPEMENT RESEAU ET NUMERIQUE','DGDDREN','2025-01-13 14:42:53','2025-01-13 14:42:53'),(71,42,'23','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(72,42,'12','INSPECTION GENERALE DES SERVICES','IGDS','2025-01-13 14:42:53','2025-01-13 14:42:53'),(73,72,'70','SERVICE DE CONTRÔLE','SDC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(74,72,'100','SERVICE DE SUIVI DES DEMANDES','SDSDD','2025-01-13 14:42:53','2025-01-13 14:42:53'),(75,43,'94','SECRETARIAT GENERALE','SG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(76,43,'57','DIRECTION GENERALE','DG','2025-01-13 14:42:53','2025-01-13 14:42:53'),(77,75,'3','SERVICE D\'ETUDE DES CANDIDATURE','SEDC','2025-01-13 14:42:53','2025-01-13 14:42:53'),(78,75,'1','SERVICE DE VALIDATION DES VOTES','SDVDV','2025-01-13 14:42:53','2025-01-13 14:42:53'),(79,76,'73','DIRECTION GENERALE ADJOINT','DGA','2025-01-13 14:42:53','2025-01-13 14:42:53'),(80,76,'75','CABINET DU MINISTRE','CDM','2025-01-13 14:42:53','2025-01-13 14:42:53'),(81,13,'9','Direction Générale du Patrimoie de l\'Etat','DGPE','2025-01-13 14:42:53','2025-01-13 14:42:53'),(82,81,'4','Service Comptabilité des Biens Mobiliers','SCBM','2025-01-13 14:42:53','2025-01-13 14:42:53'),(83,81,'53','Service Comptabilité des Biens Immobiliers','SCBI','2025-01-13 14:42:53','2025-01-13 14:42:53');

--
-- Table structure for table `administrative_units`
--

CREATE TABLE `administrative_units` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('ordonnator','national_material_accountant','material_accountant','budget_controller','treasury_accountant','collaborator','administrator') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `parent` bigint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `administrative_units_parent_foreign` (`parent`),
  CONSTRAINT `administrative_units_parent_foreign` FOREIGN KEY (`parent`) REFERENCES `administrative_units` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `administrative_units`
--

INSERT INTO `administrative_units` VALUES (1,'MINISTERE BUDGET ET COMPTES PUBLICS','MBECP','ordonnator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,NULL),(2,'Direction Générale du Patrimoine de l\'Etat','DGPE','national_material_accountant','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,1),(3,'MINISTERE DE L\'ECONOMIE ET LA RELANCE','MDEELR','ordonnator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,2),(4,'Direction Centrale des Affaires Financières','DCAF','material_accountant','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,3),(5,'Direction des Affaires Financières des Rélances','DAFR','material_accountant','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,4),(6,'Direction des Affaires Financières de l\'Economie','DAFE','material_accountant','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,4),(7,'Comptable du Trésor du MER','CTM','treasury_accountant','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,3),(8,'Controlleur Budgétaire du MER','CBM','budget_controller','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,3),(9,'Collaborateur en Chef de la Direction Centrale des Affaires Financières','CCDCAF','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,3),(10,'Collaborateur de la Direction Centrale des Affaires Financières','CDCAF','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,3),(11,'Collaborateur en Chef de la Direction des Affaires Financières des Rélances','CCDAFR','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,5),(12,'Collaborateur de la Direction des Affaires Financières des Rélances','CDAFR','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,5),(13,'Collaborateur en Chef de la Direction des Affaires Financières de l\'Economie','CCDAFE','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,6),(14,'Collaborateur de la Direction des Affaires Financières de l\'Economie','CDAFE','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,6),(15,'Collaborateur en Chef de la Direction Générale du Patrimoine de l\'Etat','CCDGPE','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,2),(16,'Collaborateur de la Direction Générale du Patrimoine de l\'Etat','CDGPE','collaborator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,2),(17,'Administrateur de la Direction Générale du Patrimoine de l\'Etat','ADGPE','administrator','2025-01-13 14:42:44','2025-01-13 14:42:44',NULL,2);

--
-- Table structure for table `beneficiaries`
--

CREATE TABLE `beneficiaries` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `administrative_supervision_id` bigint unsigned DEFAULT NULL,
  `partner` bigint unsigned DEFAULT NULL,
  `official` bigint unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('official','non_permanent_workforce','administrative_supervision','official_spouse','official_child','official_retired','pupil','student','aid_applicant','destitute','hospital','health_center','lab','clinical','dispensary','school','institute','university','professional_center','military_barracks','police_station','brigade','police_camp','city_hall','market','court','national_assembly','senate') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `applicant` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `administrative_supervision_id` (`administrative_supervision_id`),
  KEY `partner` (`partner`),
  CONSTRAINT `beneficiaries_administrative_supervision_id_foreign` FOREIGN KEY (`administrative_supervision_id`) REFERENCES `administrative_supervisions` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `beneficiaries_partner_foreign` FOREIGN KEY (`partner`) REFERENCES `beneficiaries` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `beneficiaries`
--


--
-- Table structure for table `charts`
--

CREATE TABLE `charts` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `charts_id` bigint unsigned DEFAULT NULL,
  `type` enum('pce','nnm','prog') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'nnm',
  `label` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `classe` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `stacktrace` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `charts_id` (`charts_id`),
  CONSTRAINT `charts_charts_id_foreign` FOREIGN KEY (`charts_id`) REFERENCES `charts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `charts`
--


--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


--
-- Table structure for table `financial_statements`
--

CREATE TABLE `financial_statements` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('Compte de Résultat','Grand Livre','Livre Journal','Balance de Compte','Support Comptable','Fiche Individuelle','Bilan') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `files` json DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `history` json DEFAULT NULL,
  `security_level` int NOT NULL DEFAULT '0',
  `stacktrace` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `financial_statements`
--


--
-- Table structure for table `fonctions`
--

CREATE TABLE `fonctions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `grade` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `access_level` int NOT NULL DEFAULT '0',
  `administrative_unit_id` bigint unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fonctions_administrative_unit_id_foreign` (`administrative_unit_id`),
  CONSTRAINT `fonctions_administrative_unit_id_foreign` FOREIGN KEY (`administrative_unit_id`) REFERENCES `administrative_units` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fonctions`
--

INSERT INTO `fonctions` VALUES (1,'Ordonnateur Principal','main_ordonnator',2,1,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(2,'Ordonnateur Chef','head_ordonnator',2,1,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(3,'Ordonnateur Délégué 1er','first_delegate',1,1,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(4,'Ordonnateur Délégué 2ème','second_delegate',1,1,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(5,'Comptable Matière National','national_material_accountant',2,2,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(6,'Comptable Matière National Délégué 1er','first_delegate',1,2,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(7,'Comptable Matière National Délégué 2ème','second_delegate',1,2,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(8,'Ordonnateur Principal','main_ordonnator',2,3,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(9,'Ordonnateur Chef','head_ordonnator',2,3,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(10,'Ordonnateur Délégué 1er','first_delegate',1,3,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(11,'Ordonnateur Délégué 2ème','second_delegate',1,3,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(12,'Comptable Matière Central','central_material_accountant',2,4,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(13,'Comptable Matière Chef','head_material_accountant',0,4,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(14,'Comptable Matière Central Délégué 1er','first_delegate',1,4,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(15,'Comptable Matière Central Délégué 2ème','second_delegate',1,4,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(16,'Comptable Matière Central','central_material_accountant',2,5,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(17,'Comptable Matière Chef','head_material_accountant',0,5,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(18,'Comptable Matière Central Délégué 1er','first_delegate',1,5,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(19,'Comptable Matière Central Délégué 2ème','second_delegate',1,5,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(20,'Comptable Matière Central','central_material_accountant',2,6,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(21,'Comptable Matière Chef','head_material_accountant',0,6,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(22,'Comptable Matière Central Délégué 1er','first_delegate',1,6,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(23,'Comptable Matière Central Délégué 2ème','second_delegate',1,6,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(24,'Comptable du Trésor Chef','head_treasury_accountant',0,7,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(25,'Comptable du Trésor','treasury_accountant',0,7,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(26,'Comptable du Trésor Délégué 1er','first_delegate',1,7,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(27,'Comptable du Trésor Délégué 2ème','second_delegate',1,7,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(28,'Controleur Budgetaire Chef','head_budget_controller',0,8,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(29,'Controleur budgetaire','budget_controller',0,8,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(30,'Controleur Budgetaire Délégué 1er','first_delegate',1,8,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(31,'Controleur Budgetaire Délégué 2ème','second_delegate',1,8,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(32,'Magasinier Chef','head_storekeeper',0,9,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(33,'Magasinier','storekeeper',0,9,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(34,'Magasinier Délégué 1er','first_delegate',1,9,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(35,'Magasinier Délégué 2ème','second_delegate',1,9,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(36,'Magasinier Chef','head_storekeeper',0,10,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(37,'Magasinier','storekeeper',0,10,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(38,'Magasinier Délégué 1er','first_delegate',1,10,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(39,'Magasinier Délégué 2ème','second_delegate',1,10,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(40,'Magasinier Chef','head_storekeeper',0,11,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(41,'Magasinier','storekeeper',0,11,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(42,'Magasinier Délégué 1er','first_delegate',1,11,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(43,'Magasinier Délégué 2ème','second_delegate',1,11,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(44,'Magasinier Chef','head_storekeeper',0,12,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(45,'Magasinier','storekeeper',0,12,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(46,'Magasinier Délégué 1er','first_delegate',1,12,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(47,'Magasinier Délégué 2ème','second_delegate',1,12,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(48,'Magasinier Chef','head_storekeeper',0,13,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(49,'Magasinier','storekeeper',0,13,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(50,'Magasinier Délégué 1er','first_delegate',1,13,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(51,'Magasinier Délégué 2ème','second_delegate',1,13,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(52,'Magasinier Chef','head_storekeeper',0,14,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(53,'Magasinier','storekeeper',0,14,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(54,'Magasinier Délégué 1er','first_delegate',1,14,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(55,'Magasinier Délégué 2ème','second_delegate',1,14,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(56,'Magasinier Chef','head_storekeeper',0,15,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(57,'Magasinier','storekeeper',0,15,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(58,'Magasinier Délégué 1er','first_delegate',1,15,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(59,'Magasinier Délégué 2ème','second_delegate',1,15,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(60,'Magasinier Chef','head_storekeeper',0,16,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(61,'Magasinier','storekeeper',0,16,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(62,'Magasinier Délégué 1er','first_delegate',1,16,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(63,'Magasinier Délégué 2ème','second_delegate',1,16,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(64,'Chef','manager',0,17,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(65,'Chef Adjoint','assistant_manager',0,17,'2025-01-13 14:42:44','2025-01-13 14:42:44'),(66,'Agent','agent',0,17,'2025-01-13 14:42:44','2025-01-13 14:42:44');

--
-- Table structure for table `interims`
--

CREATE TABLE `interims` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `effective_date` date DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `cancelled_at` date DEFAULT NULL,
  `files` json DEFAULT NULL,
  `terminated_at` timestamp NULL DEFAULT NULL,
  `termination_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `security_level` int NOT NULL DEFAULT '0',
  `stacktrace` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `holder` bigint unsigned DEFAULT NULL,
  `temp` bigint unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `interims_holder_foreign` (`holder`),
  KEY `interims_temp_foreign` (`temp`),
  CONSTRAINT `interims_holder_foreign` FOREIGN KEY (`holder`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `interims_temp_foreign` FOREIGN KEY (`temp`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `interims`
--


--
-- Table structure for table `inventories`
--

CREATE TABLE `inventories` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `charts_id` bigint unsigned DEFAULT NULL,
  `property_id` bigint unsigned DEFAULT NULL,
  `type` enum('in_progress_inv','annual_inv') COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nature` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `files` json DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `stacktrace` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `charts_id` (`charts_id`),
  KEY `property_id` (`property_id`),
  CONSTRAINT `inventories_charts_id_foreign` FOREIGN KEY (`charts_id`) REFERENCES `charts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `inventories_property_id_foreign` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventories`
--


--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `job_batches`
--


--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `jobs`
--


--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` VALUES (1,'2024_08_08_073502_create_administrative_units_table',1),(2,'2024_08_08_073503_create_fonctions_table',1),(3,'2024_08_08_073504_create_users_table',1),(4,'2024_08_08_073505_create_cache_table',1),(5,'2024_08_08_073506_create_jobs_table',1),(6,'2024_08_08_073507_create_personal_access_tokens_table',1),(7,'2024_08_09_134937_create_charts_table',1),(8,'2024_08_09_135855_create_properties_table',1),(9,'2024_08_09_140557_create_moves_table',1),(10,'2024_08_09_141001_create_administrative_supervisions_table',1),(11,'2024_08_09_141021_create_beneficiaries_table',1),(12,'2024_08_09_141140_create_financial_statements_table',1),(13,'2024_08_09_141155_create_inventories_table',1),(14,'2024_08_09_141237_create_support_comptas_table',1),(15,'2024_08_14_150234_create_interims_table',1);

--
-- Table structure for table `moves`
--

CREATE TABLE `moves` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `charts_id` bigint unsigned DEFAULT NULL,
  `property_id` bigint unsigned DEFAULT NULL,
  `type` enum('move_in','def_move_out','temp_move_out','intern_move') COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `period` date NOT NULL,
  `files` json DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `history` json DEFAULT NULL,
  `stacktrace` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `charts_id` (`charts_id`),
  KEY `property_id` (`property_id`),
  CONSTRAINT `moves_charts_id_foreign` FOREIGN KEY (`charts_id`) REFERENCES `charts` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `moves_property_id_foreign` FOREIGN KEY (`property_id`) REFERENCES `properties` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `moves`
--


--
-- Table structure for table `properties`
--

CREATE TABLE `properties` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `type` enum('housing','office','shed','warehouse','terrain','land_vehicle','aerial_vehicle','sea_vehicle','railway_vehicle','furniture','printed') COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `category` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `available` tinyint(1) DEFAULT NULL,
  `files` json DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `stacktrace` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `properties`
--


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--


--
-- Table structure for table `support_comptas`
--

CREATE TABLE `support_comptas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `financial_statement_id` bigint unsigned DEFAULT NULL,
  `move_id` bigint unsigned DEFAULT NULL,
  `inventory_id` bigint unsigned DEFAULT NULL,
  `label` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` enum('En Cours','Initialisé','Cloturer') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `files` json DEFAULT NULL,
  `additional_info` json DEFAULT NULL,
  `stacktrace` json DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `financial_statement_id` (`financial_statement_id`),
  KEY `move_id` (`move_id`),
  KEY `inventory_id` (`inventory_id`),
  CONSTRAINT `support_comptas_financial_statement_id_foreign` FOREIGN KEY (`financial_statement_id`) REFERENCES `financial_statements` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `support_comptas_inventory_id_foreign` FOREIGN KEY (`inventory_id`) REFERENCES `inventories` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `support_comptas_move_id_foreign` FOREIGN KEY (`move_id`) REFERENCES `moves` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `support_comptas`
--



