-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : ven. 24 fév. 2023 à 12:38
-- Version du serveur : 8.0.31
-- Version de PHP : 8.0.26

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

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

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

--
-- Structure de la table `consommations`
--

CREATE TABLE `consommations` (
  `id` int NOT NULL,
  `relais_id` int DEFAULT NULL,
  `index_old` int DEFAULT NULL,
  `index_new` int DEFAULT NULL,
  `consommation` int DEFAULT NULL,
  `amount` int DEFAULT NULL,
  `volume` int DEFAULT NULL,
  `created_by` int NOT NULL,
  `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `updated_at` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

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

INSERT INTO `consommations` (`id`, `relais_id`, `index_old`, `index_new`, `consommation`, `amount`, `volume`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 1, 0, 2000, 200, 25000, 115, 1, '2023-02-16 13:02:45.000000', '2023-02-16 13:02:45.000000'),
(3, 1, 2000, 1750, 200, 25000, 115, 1, '2023-02-16 13:07:27.000000', '2023-02-16 13:07:27.000000');

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

--
-- Structure de la table `generators`
--

CREATE TABLE `generators` (
  `id` int NOT NULL,
  `title` varchar(52) DEFAULT NULL,
  `slug` varchar(52) DEFAULT NULL,
  `overview` text,
  `address` text,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` int NOT NULL,
  `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `updated_at` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

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

--
-- Structure de la table `relais`
--

CREATE TABLE `relais` (
  `id` int NOT NULL,
  `name` varchar(52) CHARACTER SET utf8mb4  NOT NULL,
  `slug` varchar(52) NOT NULL,
  `status` tinyint(1) DEFAULT '1',
  `overview` text,
  `address` text,
  `created_by` int NOT NULL,
  `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `updated_at` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

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

INSERT INTO `relais` (`id`, `name`, `slug`, `status`, `overview`, `address`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'AE01', 'ae01', 1, 'Relais de Golf', 'Golf', 1, '2023-02-15 14:34:25.000000', '2023-02-23 16:09:25.000000'),
(2, 'AE02', 'ae02', 1, 'Relais de Baco-djicoroni', 'Baco-djicoroni', 1, '2023-02-15 14:34:55.000000', '2023-02-15 15:13:38.000000'),
(3, 'AE03', 'ae03', 1, 'Relais de Kalaban', 'Kalaban', 1, '2023-02-15 14:41:39.000000', '2023-02-15 14:50:12.000000'),
(6, 'AE02', 'ae02-2', 1, 'Relais de Baco-djicoroni', 'Golf', 1, '2023-02-20 16:20:41.000000', '2023-02-20 16:20:41.000000');

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

--
-- Structure de la table `roles`
--

CREATE TABLE `roles` (
  `id` int NOT NULL,
  `title` varchar(52) DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1',
  `overview` text,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp(6) NOT NULL,
  `updated_at` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

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

INSERT INTO `roles` (`id`, `title`, `slug`, `status`, `overview`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'Super administrateur', 'super-administrateur', 1, NULL, NULL, '2023-02-13 13:57:47.000000', NULL),
(2, 'Administrateur', 'administrateur', 1, NULL, 1, '2023-02-20 16:34:40.000000', '2023-02-23 16:09:09.000000'),
(4, 'Hey', 'hey', 1, NULL, 4, '2023-02-23 16:12:14.000000', '2023-02-23 16:12:14.000000');

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

--
-- Structure de la table `users`
--

CREATE TABLE `users` (
  `id` int NOT NULL,
  `first_name` varchar(52) DEFAULT NULL,
  `last_name` varchar(52) DEFAULT NULL,
  `username` varchar(52) NOT NULL,
  `email` varchar(52) DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4  NOT NULL,
  `role_id` int NOT NULL,
  `phone` varchar(52) CHARACTER SET utf8mb4  DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1',
  `session` tinyint(1) DEFAULT NULL,
  `reset_token` varchar(255) DEFAULT NULL,
  `last_login` timestamp(6) NULL DEFAULT NULL,
  `last_logout` timestamp(6) NULL DEFAULT NULL,
  `created_by` int NOT NULL,
  `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `updated_at` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

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

INSERT INTO `users` (`id`, `first_name`, `last_name`, `username`, `email`, `password`, `role_id`, `phone`, `status`, `session`, `reset_token`, `last_login`, `last_logout`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'Oumar', NULL, 'oumarmaiga', 'oumarmaiga@afribonemali.net', '$2y$10$n5gym28UQApRRAFInNX27e/GNYjimGLt/6mQfsIZM0WAa7bYX09Z2', 0, NULL, 1, NULL, NULL, '2023-02-13 11:02:45.000000', '2023-02-13 11:02:32.000000', 0, '2023-02-08 15:16:10.000000', '2023-02-23 15:50:51.000000'),
(2, 'Alassane', 'Niambele', 'alassaneniambele', 'oumarm611@gmail.com', '$2y$10$K5ZMZuX7fqHCba0de23/n.8mGcBHPOwvtWI8XoHta7LpgAuZ4lwOS', 2, NULL, 1, NULL, 'b244f55c07aa17d36fe70232878e58dff4ae56f1e58f2e32afb67a441c34923d7c545f6dd3c892dc7bc9ef616410aae5b555086204537dd0836dcb621f4856e1', NULL, NULL, 1, '2023-02-13 14:17:07.000000', '2023-02-24 12:32:05.000000'),
(4, 'Oudi', 'Maiga', 'ousmanediallo', 'oudi@gmail.com', '$2y$10$UNUOI1J/4jzNtc4n2EnoPeBDiiu.fbKGOKuCFuVHhYybVn4X8Z23e', 1, '787878777', 1, 0, NULL, '2023-02-24 12:33:06.000000', '2023-02-24 12:34:19.000000', 1, '2023-02-15 14:33:11.000000', '2023-02-24 12:34:19.000000');

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

--
-- Index pour la table `consommations`
--
ALTER TABLE `consommations`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `generators`
--
ALTER TABLE `generators`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `relais`
--
ALTER TABLE `relais`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

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

--
-- AUTO_INCREMENT pour la table `consommations`
--
ALTER TABLE `consommations`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `generators`
--
ALTER TABLE `generators`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `relais`
--
ALTER TABLE `relais`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT pour la table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT pour la table `users`
--
ALTER TABLE `users`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
