Social Network
Présentation
Une application de social network, vous pouvez retrouver le tutoriel ici:
ici Télécharger
Télécharger l'application Github
https://github.com/imikado/socialnetwork
git clone https://github.com/imikado/socialnetwork .
SQL de la base de données
Ci dessous la requête SQL de création de la structure de la base
CREATE TABLE Users (
id INT NULL AUTO_INCREMENT,
mail VARCHAR(50) NULL,
login VARCHAR(50) NULL,
pass VARCHAR(50) NULL,
profilPicture VARCHAR(50) NULL,
firstname VARCHAR(50) NULL,
lastname VARCHAR(50) NULL,
job VARCHAR(50) NULL,
status VARCHAR(100) NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Friends (
id INT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
user_id2 INT NOT NULL,
state INT NOT NULL,
PRIMARY KEY id (id)
);
CREATE TABLE UsersGroup (
id INT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
group_id INT NOT NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Groups (
id INT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
name VARCHAR(50) NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Pictures (
id INT NULL AUTO_INCREMENT,
path VARCHAR(50) NULL,
name VARCHAR(50) NULL,
album_id INT NOT NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Albums (
id INT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
name VARCHAR(50) NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Posts (
id INT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
title VARCHAR(150) NULL,
body VARCHAR(250) NULL,
date DATE NULL,
time TIME NULL,
state INT NOT NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Share (
id INT NULL AUTO_INCREMENT,
user_id INT NULL,
album_id INT NULL,
post_id INT NULL,
group_id INT NOT NULL,
date DATE NULL,
time TIME NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Likes (
id INT NULL AUTO_INCREMENT,
user_id INT NULL,
post_id INT NULL,
PRIMARY KEY id (id)
);
CREATE TABLE Comments (
id INT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
post_id INT NULL,
body VARCHAR(250) NULL,
date DATE NULL,
time TIME NULL,
PRIMARY KEY id (id)
);