-- phpMyAdmin SQL Dump
-- version 5.2.1deb1+jammy2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : dim. 17 mars 2024 à 15:14
-- Version du serveur : 10.6.16-MariaDB-0ubuntu0.22.04.1
-- Version de PHP : 8.1.2-1ubuntu2.14
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 : `E59`
--
-- --------------------------------------------------------
--
-- Structure de la table `articles`
--
CREATE TABLE `articles` (
`ID` int(12) NOT NULL,
`title` varchar(255) NOT NULL,
`creation_date` datetime NOT NULL DEFAULT current_timestamp(),
`last_update` datetime NOT NULL DEFAULT current_timestamp(),
`author` int(12) NOT NULL COMMENT 'users.ID',
`classification` int(12) NOT NULL COMMENT 'confidential_levels.ID',
`miniature` varchar(255) DEFAULT NULL,
`resume` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Déchargement des données de la table `articles`
--
-- --------------------------------------------------------
--
-- Structure de la table `confidential_levels`
--
CREATE TABLE `confidential_levels` (
`ID` int(11) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Déchargement des données de la table `confidential_levels`
--
INSERT INTO `confidential_levels` (`ID`, `name`) VALUES
(0, 'E59i-P (Public)'),
(10, 'E59i-M (Membres)'),
(20, 'E59i-R (Responsables)'),
(50, 'E59i-D (Direction)');
-- --------------------------------------------------------
--
-- Structure de la table `roles`
--
CREATE TABLE `roles` (
`ID` int(11) NOT NULL,
`badge_svg` varchar(2047) NOT NULL,
`role_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Déchargement des données de la table `roles`
--
INSERT INTO `roles` (`ID`, `badge_svg`, `role_name`) VALUES
(0, ' ', 'Non connecté'),
(1, '', 'Connecté'),
(10, '', 'Membre'),
(20, '', 'Responsable'),
(50, '', 'Directeur');
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE TABLE `users` (
`ID` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) DEFAULT NULL,
`creation_date` datetime NOT NULL DEFAULT current_timestamp(),
`last_update` datetime NOT NULL DEFAULT current_timestamp(),
`display_name` varchar(255) DEFAULT 'Guest',
`role` int(12) NOT NULL DEFAULT 0 COMMENT 'roles.ID',
`accreditation` int(12) NOT NULL DEFAULT 0 COMMENT 'confidential_levels.ID',
`profile_picture` varchar(255) DEFAULT NULL,
`banner` varchar(255) DEFAULT '',
`bio` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Déchargement des données de la table `users`
--
INSERT INTO `users` (`ID`, `username`, `password`, `email`, `creation_date`, `last_update`, `display_name`, `role`, `accreditation`, `profile_picture`, `banner`, `bio`) VALUES
(0, 'deleted_user', '0', NULL, '2024-03-14 20:22:10', '2024-03-17 14:21:53', 'Deleted User', 1, 1, NULL, '', NULL),
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin@e59.fr', '2024-03-07 19:42:01', '2024-03-17 14:21:53', 'Administrateur', 50, 50, '/assets/pp/1.png', '/assets/banners/1.png', ''),
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `articles`
--
ALTER TABLE `articles`
ADD PRIMARY KEY (`ID`);
--
-- Index pour la table `confidential_levels`
--
ALTER TABLE `confidential_levels`
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 `articles`
--
ALTER TABLE `articles`
MODIFY `ID` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT pour la table `confidential_levels`
--
ALTER TABLE `confidential_levels`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;
--
-- AUTO_INCREMENT pour la table `roles`
--
ALTER TABLE `roles`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=101;
--
-- AUTO_INCREMENT pour la table `users`
--
ALTER TABLE `users`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
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 */;