Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Raphaël PEIM
projet-cdaw
Commits
23209ae6
Commit
23209ae6
authored
Dec 03, 2020
by
raphael.peim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create CreateDB.sql
parent
64008288
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
287 additions
and
2 deletions
+287
-2
createDB.sql
AGL/BD/createDB.sql
+142
-0
MPD.png
AGL/Conception/MPD.png
+0
-0
createDB.sql
BackEnd/api/sql/createDB.sql
+142
-0
Index.vue
frontend/src/views/Index.vue
+2
-2
Profile.vue
frontend/src/views/Profile.vue
+1
-0
No files found.
AGL/BD/createDB.sql
0 → 100644
View file @
23209ae6
-- phpMyAdmin SQL Dump
-- version 4.9.3
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:8889
-- Généré le : jeu. 03 déc. 2020 à 22:19
-- Version du serveur : 5.7.26
-- Version de PHP : 7.4.2
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
SET
time_zone
=
"+00:00"
;
--
-- Base de données : `dbtest`
--
-- --------------------------------------------------------
--
-- Structure de la table `game`
--
CREATE
TABLE
`game`
(
`id`
int
(
11
)
NOT
NULL
,
`private`
tinyint
(
1
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
-- Déchargement des données de la table `game`
--
INSERT
INTO
`game`
(
`id`
,
`private`
)
VALUES
(
1
,
0
),
(
2
,
1
);
-- --------------------------------------------------------
--
-- Structure de la table `tournament`
--
CREATE
TABLE
`tournament`
(
`id`
int
(
11
)
NOT
NULL
,
`id_game`
int
(
11
)
NOT
NULL
,
`id_user`
int
(
11
)
NOT
NULL
,
`score`
int
(
11
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
-- Déchargement des données de la table `tournament`
--
INSERT
INTO
`tournament`
(
`id`
,
`id_game`
,
`id_user`
,
`score`
)
VALUES
(
1
,
1
,
1
,
1250
),
(
2
,
1
,
2
,
1000
),
(
3
,
1
,
4
,
1200
),
(
4
,
1
,
3
,
1000
);
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE
TABLE
`users`
(
`id`
int
(
11
)
NOT
NULL
,
`firstname`
varchar
(
50
)
NOT
NULL
,
`lastname`
varchar
(
50
)
NOT
NULL
,
`login`
varchar
(
50
)
NOT
NULL
,
`email`
varchar
(
255
)
NOT
NULL
,
`password`
varchar
(
255
)
NOT
NULL
,
`role`
smallint
(
6
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
-- Déchargement des données de la table `users`
--
INSERT
INTO
`users`
(
`id`
,
`firstname`
,
`lastname`
,
`login`
,
`email`
,
`password`
,
`role`
)
VALUES
(
1
,
'Raphaël'
,
'Peim'
,
'Raph'
,
'rp@gmail.com'
,
'$2a$10$y9e4QV2mGc.j2l81n82KbOpDJB2m9O564pEOwLj58TsztFn6Fg552'
,
1
),
(
2
,
'John'
,
'Doe'
,
'John'
,
'jd@etu.imt-lille-douai.fr'
,
'$2a$10$EsNS5onYP0YacQR6Kpbgqu1r1nPXM3ag/dNVhD.Ui3eSJZkgkhYau'
,
0
),
(
3
,
'Nolwenn'
,
'Le Gourierec'
,
'Nono'
,
'nlg@etu.imt-lille-douai.fr'
,
'$2a$10$EsNS5onYP0YacQR6Kpbgqu1r1nPXM3ag/dNVhD.Ui3eSJZkgkhYau'
,
0
),
(
4
,
'Romain'
,
'Benaya'
,
'Romich'
,
'rb@etu.imt-lille-douai.fr'
,
'$2a$10$EsNS5onYP0YacQR6Kpbgqu1r1nPXM3ag/dNVhD.Ui3eSJZkgkhYau'
,
0
);
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `game`
--
ALTER
TABLE
`game`
ADD
PRIMARY
KEY
(
`id`
);
--
-- Index pour la table `tournament`
--
ALTER
TABLE
`tournament`
ADD
PRIMARY
KEY
(
`id`
),
ADD
KEY
`id_game`
(
`id_game`
,
`id_user`
),
ADD
KEY
`id_user`
(
`id_user`
);
--
-- Index pour la table `users`
--
ALTER
TABLE
`users`
ADD
PRIMARY
KEY
(
`id`
),
ADD
UNIQUE
KEY
`email`
(
`email`
),
ADD
UNIQUE
KEY
`login`
(
`login`
);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `game`
--
ALTER
TABLE
`game`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
3
;
--
-- AUTO_INCREMENT pour la table `tournament`
--
ALTER
TABLE
`tournament`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
5
;
--
-- AUTO_INCREMENT pour la table `users`
--
ALTER
TABLE
`users`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
9
;
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `tournament`
--
ALTER
TABLE
`tournament`
ADD
CONSTRAINT
`tournament_ibfk_1`
FOREIGN
KEY
(
`id_user`
)
REFERENCES
`users`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
,
ADD
CONSTRAINT
`tournament_ibfk_2`
FOREIGN
KEY
(
`id_game`
)
REFERENCES
`game`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
;
AGL/Conception/MPD.png
0 → 100644
View file @
23209ae6
41.9 KB
BackEnd/api/sql/createDB.sql
View file @
23209ae6
-- phpMyAdmin SQL Dump
-- version 4.9.3
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:8889
-- Généré le : jeu. 03 déc. 2020 à 22:19
-- Version du serveur : 5.7.26
-- Version de PHP : 7.4.2
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
SET
time_zone
=
"+00:00"
;
--
-- Base de données : `dbtest`
--
-- --------------------------------------------------------
--
-- Structure de la table `game`
--
CREATE
TABLE
`game`
(
`id`
int
(
11
)
NOT
NULL
,
`private`
tinyint
(
1
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
-- Déchargement des données de la table `game`
--
INSERT
INTO
`game`
(
`id`
,
`private`
)
VALUES
(
1
,
0
),
(
2
,
1
);
-- --------------------------------------------------------
--
-- Structure de la table `tournament`
--
CREATE
TABLE
`tournament`
(
`id`
int
(
11
)
NOT
NULL
,
`id_game`
int
(
11
)
NOT
NULL
,
`id_user`
int
(
11
)
NOT
NULL
,
`score`
int
(
11
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
-- Déchargement des données de la table `tournament`
--
INSERT
INTO
`tournament`
(
`id`
,
`id_game`
,
`id_user`
,
`score`
)
VALUES
(
1
,
1
,
1
,
1250
),
(
2
,
1
,
2
,
1000
),
(
3
,
1
,
4
,
1200
),
(
4
,
1
,
3
,
1000
);
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE
TABLE
`users`
(
`id`
int
(
11
)
NOT
NULL
,
`firstname`
varchar
(
50
)
NOT
NULL
,
`lastname`
varchar
(
50
)
NOT
NULL
,
`login`
varchar
(
50
)
NOT
NULL
,
`email`
varchar
(
255
)
NOT
NULL
,
`password`
varchar
(
255
)
NOT
NULL
,
`role`
smallint
(
6
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
--
-- Déchargement des données de la table `users`
--
INSERT
INTO
`users`
(
`id`
,
`firstname`
,
`lastname`
,
`login`
,
`email`
,
`password`
,
`role`
)
VALUES
(
1
,
'Raphaël'
,
'Peim'
,
'Raph'
,
'rp@gmail.com'
,
'$2a$10$y9e4QV2mGc.j2l81n82KbOpDJB2m9O564pEOwLj58TsztFn6Fg552'
,
1
),
(
2
,
'John'
,
'Doe'
,
'John'
,
'jd@etu.imt-lille-douai.fr'
,
'$2a$10$EsNS5onYP0YacQR6Kpbgqu1r1nPXM3ag/dNVhD.Ui3eSJZkgkhYau'
,
0
),
(
3
,
'Nolwenn'
,
'Le Gourierec'
,
'Nono'
,
'nlg@etu.imt-lille-douai.fr'
,
'$2a$10$EsNS5onYP0YacQR6Kpbgqu1r1nPXM3ag/dNVhD.Ui3eSJZkgkhYau'
,
0
),
(
4
,
'Romain'
,
'Benaya'
,
'Romich'
,
'rb@etu.imt-lille-douai.fr'
,
'$2a$10$EsNS5onYP0YacQR6Kpbgqu1r1nPXM3ag/dNVhD.Ui3eSJZkgkhYau'
,
0
);
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `game`
--
ALTER
TABLE
`game`
ADD
PRIMARY
KEY
(
`id`
);
--
-- Index pour la table `tournament`
--
ALTER
TABLE
`tournament`
ADD
PRIMARY
KEY
(
`id`
),
ADD
KEY
`id_game`
(
`id_game`
,
`id_user`
),
ADD
KEY
`id_user`
(
`id_user`
);
--
-- Index pour la table `users`
--
ALTER
TABLE
`users`
ADD
PRIMARY
KEY
(
`id`
),
ADD
UNIQUE
KEY
`email`
(
`email`
),
ADD
UNIQUE
KEY
`login`
(
`login`
);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `game`
--
ALTER
TABLE
`game`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
3
;
--
-- AUTO_INCREMENT pour la table `tournament`
--
ALTER
TABLE
`tournament`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
5
;
--
-- AUTO_INCREMENT pour la table `users`
--
ALTER
TABLE
`users`
MODIFY
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
9
;
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `tournament`
--
ALTER
TABLE
`tournament`
ADD
CONSTRAINT
`tournament_ibfk_1`
FOREIGN
KEY
(
`id_user`
)
REFERENCES
`users`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
,
ADD
CONSTRAINT
`tournament_ibfk_2`
FOREIGN
KEY
(
`id_game`
)
REFERENCES
`game`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
;
frontend/src/views/Index.vue
View file @
23209ae6
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
}
}
})
})
.
then
(
data
=>
{
.
then
(
data
=>
{
// Données de l'utilisateur
{{ Login }}
, undefined s'il n'existe pas
// Données de l'utilisateur, undefined s'il n'existe pas
const
row
=
data
[
data
.
findIndex
((
e
)
=>
e
.
login
==
form
.
elements
.
login
.
value
)]
const
row
=
data
[
data
.
findIndex
((
e
)
=>
e
.
login
==
form
.
elements
.
login
.
value
)]
if
(
row
!==
undefined
)
{
if
(
row
!==
undefined
)
{
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
}
}
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
error
(
error
)
console
.
error
(
error
)
})
;
})
},
},
getToken
(
login
,
password
)
{
getToken
(
login
,
password
)
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
...
...
frontend/src/views/Profile.vue
View file @
23209ae6
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
Navbar
Navbar
},
},
beforeMount
()
{
beforeMount
()
{
this
.
getData
()
this
.
getData
()
},
},
methods
:
{
methods
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment