You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE_2A_FA-Reseau_ALICA/bdd.sql

258 lines
8.2 KiB

1 year ago
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Nov 22, 2023 at 05:07 PM
-- Server version: 8.0.31
-- PHP Version: 8.1.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `dbalica`
--
-- --------------------------------------------------------
--
-- Table structure for table `alumni`
--
DROP TABLE IF EXISTS `alumni`;
CREATE TABLE IF NOT EXISTS `alumni` (
`id` int NOT NULL AUTO_INCREMENT,
`mail` varchar(128) NOT NULL,
`mdp` varchar(256) NOT NULL,
`role` varchar(16) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `mail` (`mail`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3;
--
-- Dumping data for table `alumni`
--
INSERT INTO `alumni` (`id`, `mail`, `mdp`, `role`) VALUES
(1, 'test', 'test', 'admin'),
(2, 't@t', '$2y$10$UUG8075sdZ7B1MLKtz.66.jY763TCdqpbMKKSX/K5DMBhXYsaLDXy', 'Membre');
-- --------------------------------------------------------
--
-- Table structure for table `article`
--
DROP TABLE IF EXISTS `article`;
CREATE TABLE IF NOT EXISTS `article` (
`id` int NOT NULL AUTO_INCREMENT,
`auteur` int NOT NULL,
`Titre` varchar(64) NOT NULL,
`sousTitre` varchar(64) NOT NULL,
`description` varchar(1024) NOT NULL,
`image` int NOT NULL,
PRIMARY KEY (`id`),
KEY `image` (`image`),
KEY `auteur` (`auteur`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Table structure for table `evenement`
--
DROP TABLE IF EXISTS `evenement`;
CREATE TABLE IF NOT EXISTS `evenement` (
`id` int NOT NULL AUTO_INCREMENT,
`organisateur` int NOT NULL,
`titre` varchar(64) NOT NULL,
`description` varchar(512) NOT NULL,
`image` varchar(256) NOT NULL,
`date` date NOT NULL,
`nbPlaceMax` int NOT NULL,
PRIMARY KEY (`id`),
KEY `organisateur` (`organisateur`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;
--
-- Dumping data for table `evenement`
--
INSERT INTO `evenement` (`id`, `organisateur`, `titre`, `description`, `image`, `date`, `nbPlaceMax`) VALUES
(1, 2, 'Atelier photographie', 'Ateliers Photo : tout ce que vous devez savoir pour devenir expert ! Il existe différents types d\'ateliers pour découvrir la magie de la photographie.', 'https://cdn.futura-sciences.com/buildsv6/images/wide1920/5/4/a/54a14c90eb_125482_bien-debuter-photographie.jpg', '2023-11-09', 10),
(2, 2, 'Laser game', 'Jeu de tir laser où les participants s\'affrontent pour marquer un maximum de points.', 'https://lvdneng.rosselcdn.net/sites/default/files/dpistyles_v2/ena_16_9_extra_big/2020/06/24/node_769129/47482757/public/2020/06/24/B9723823714Z.1_20200624175143_000%2BG15G7JJ5O.3-0.jpg', '2023-11-22', 15);
-- --------------------------------------------------------
--
-- Table structure for table `experience`
--
DROP TABLE IF EXISTS `experience`;
CREATE TABLE IF NOT EXISTS `experience` (
`id` int NOT NULL AUTO_INCREMENT,
`profil` int NOT NULL,
`intitule` varchar(256) NOT NULL,
`dateDebut` date NOT NULL,
`dateFin` date NOT NULL,
`nomEntreprise` varchar(64) NOT NULL,
`currentJob` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Table structure for table `formation`
--
DROP TABLE IF EXISTS `formation`;
CREATE TABLE IF NOT EXISTS `formation` (
`id` int NOT NULL AUTO_INCREMENT,
`profil` int NOT NULL,
`nom` varchar(64) NOT NULL,
`ville` varchar(32) NOT NULL,
`dateDeb` date NOT NULL,
`dateFin` date NOT NULL,
`currentFormation` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Table structure for table `image`
--
DROP TABLE IF EXISTS `image`;
CREATE TABLE IF NOT EXISTS `image` (
`id` int NOT NULL AUTO_INCREMENT,
`nom` varchar(50) NOT NULL,
`taille` varchar(25) NOT NULL,
`type` varchar(25) NOT NULL,
`blob` longblob NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Table structure for table `offre`
--
DROP TABLE IF EXISTS `offre`;
CREATE TABLE IF NOT EXISTS `offre` (
`id` int NOT NULL AUTO_INCREMENT,
`offreur` int NOT NULL,
`titre` varchar(128) NOT NULL,
`description` varchar(1024) NOT NULL,
`image` varchar(100) NOT NULL,
`logo` varchar(100) NOT NULL,
`typeContrat` varchar(16) NOT NULL,
`ville` varchar(64) NOT NULL,
`entreprise` varchar(64) NOT NULL,
`descriptifPoste` varchar(2028) NOT NULL,
`profil` varchar(2028) NOT NULL,
`experience` varchar(512) NOT NULL,
`niveauEtudes` varchar(16) NOT NULL,
`mailContact` varchar(128) NOT NULL,
`numero` varchar(12) NOT NULL,
`websiteURL` varchar(256) NOT NULL,
`remote` tinyint(1) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`),
KEY `offreur` (`offreur`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3;
--
-- Dumping data for table `offre`
--
INSERT INTO `offre` (`id`, `offreur`, `titre`, `description`, `image`, `logo`, `typeContrat`, `ville`, `entreprise`, `descriptifPoste`, `profil`, `experience`, `niveauEtudes`, `mailContact`, `numero`, `websiteURL`, `remote`, `date`) VALUES
(1, 2, 'Dev web', 'recherche alternant développeur php pour une année', 'https://pbs.twimg.com/profile_images/1542807492027113473/kuqya8nY_400x400.jpg', 'https://pbs.twimg.com/profile_images/1542807492027113473/kuqya8nY_400x400.jpg', 'Alternance', 'Clermont-Ferrand', 'CGI', 'développement de fonctionnalités diverses sur un framework mvc en php', 'Etudiant en Bac+2', 'Aucunes expériencse requises', 'Bac+2', 'cgi@mail.fr', '000000000000', 'cgi.com', 1, '2023-11-09');
-- --------------------------------------------------------
--
-- Table structure for table `participer`
--
DROP TABLE IF EXISTS `participer`;
CREATE TABLE IF NOT EXISTS `participer` (
`alumni` int NOT NULL,
`evenement` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Table structure for table `profil`
--
DROP TABLE IF EXISTS `profil`;
CREATE TABLE IF NOT EXISTS `profil` (
`id` int NOT NULL AUTO_INCREMENT,
`alumni` int NOT NULL,
`email` varchar(128) NOT NULL,
`cv` varchar(256) DEFAULT NULL,
`nom` varchar(64) NOT NULL,
`prenom` varchar(32) NOT NULL,
`linkedinURL` varchar(256) DEFAULT NULL,
`githubURL` varchar(256) DEFAULT NULL,
`portfolioURL` varchar(256) DEFAULT NULL,
`image` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `alumni` (`alumni`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;
--
-- Dumping data for table `profil`
--
INSERT INTO `profil` (`id`, `alumni`, `email`, `cv`, `nom`, `prenom`, `linkedinURL`, `githubURL`, `portfolioURL`, `image`) VALUES
(1, 1, 'jeandujardin@mail.fr', 'cv', 'Dujardin ', 'Jean', 'linkedinurl', 'github.com', 'portfolio.url', 'https://i.pinimg.com/originals/05/07/0d/05070dd4bc9c21c00b92c4083b962812.jpg'),
(2, 2, 't@t', 'cv', 'dujardin', 'thea', 'linkedin.com', 'github.com', 'portoflio.url', 'https://as2.ftcdn.net/v2/jpg/03/04/13/09/1000_F_304130911_sWj5OqYpwCfMxnlAG01DTLvQkEIBzhji.jpg');
--
-- Constraints for dumped tables
--
--
-- Constraints for table `article`
--
ALTER TABLE `article`
ADD CONSTRAINT `article_ibfk_1` FOREIGN KEY (`image`) REFERENCES `image` (`id`),
ADD CONSTRAINT `article_ibfk_2` FOREIGN KEY (`auteur`) REFERENCES `alumni` (`id`);
--
-- Constraints for table `evenement`
--
ALTER TABLE `evenement`
ADD CONSTRAINT `evenement_ibfk_1` FOREIGN KEY (`organisateur`) REFERENCES `alumni` (`id`);
--
-- Constraints for table `offre`
--
ALTER TABLE `offre`
ADD CONSTRAINT `offre_ibfk_1` FOREIGN KEY (`offreur`) REFERENCES `alumni` (`id`);
--
-- Constraints for table `profil`
--
ALTER TABLE `profil`
ADD CONSTRAINT `fk_profil_alumni` FOREIGN KEY (`alumni`) REFERENCES `alumni` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;