Merge branch 'dev' into Vincent

valid
This commit is contained in:
Vincent Ramiere 2022-02-14 17:40:24 +01:00
commit eadca672ba
7 changed files with 670 additions and 47 deletions

2
.gitignore vendored
View File

@ -35,3 +35,5 @@ out/
### VS Code ###
.vscode/
application.properties

View File

@ -61,11 +61,11 @@ public class PreferenceController {
// return ResponseEntity.status(HttpStatus.OK).body(preferenceRepository.save(personne));
// }
//
// @DeleteMapping(value = "/delete-restaurant/{id}")
// public void suppressionPerso(@PathVariable int id){
//
// preferenceRepository.deleteById(id);
// }
@DeleteMapping("/delete-preference/{idrestau}/{iduser}")
public void deletePreferenceById(@PathVariable int iduser, @PathVariable int idrestau ){
PreferencePK id = new PreferencePK(personneRepository.getById(iduser) ,restaurantRepository.getById(idrestau));
preferenceRepository.deleteById(id);
}
}

View File

@ -4,6 +4,7 @@ package fr.cardon.simpleat.model;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -12,7 +13,9 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@Entity
@ -24,6 +27,7 @@ public class Personne {
private String email;
private String password;
private Collection<Role> roles = new ArrayList<Role>();
private Collection<Preference> preference = new ArrayList<Preference>();
public Personne() {
@ -106,5 +110,17 @@ public class Personne {
public void setRoles(Collection<Role> roles) {
this.roles = roles;
}
@OneToMany(mappedBy = "preferencePK.personne", cascade = CascadeType.REMOVE)
@JsonIgnore
public Collection<Preference> getPreference() {
return preference;
}
public void setPreference(Collection<Preference> preference) {
this.preference = preference;
}
}

View File

@ -8,6 +8,7 @@ import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@ -37,7 +38,7 @@ public class PreferencePK implements Serializable {
@ManyToOne
@JoinColumn(name="id_personne", referencedColumnName ="id_personne" )
@PrimaryKeyJoinColumn(name="id_personne", referencedColumnName ="id_personne" )
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public Personne getPersonne() {
return personne;
@ -50,7 +51,7 @@ public class PreferencePK implements Serializable {
@ManyToOne // TODO mappedBy preferences dans restaurant
@JoinColumn(name="id_restau",referencedColumnName ="id_restau" )
@PrimaryKeyJoinColumn(name="id_restau",referencedColumnName ="id_restau" )
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public Restaurant getRestau() {
return restau;

View File

@ -3,6 +3,7 @@ package fr.cardon.simpleat.model;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -11,6 +12,7 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
@ -24,15 +26,15 @@ public class Restaurant {
private String nom;
private String adresse;
private String telephone;
private boolean aEmporter;
private boolean surPlace;
private int prix;
private boolean accesPMR;
private Boolean aEmporter;
private Boolean surPlace;
private Integer prix;
private Boolean accesPMR;
private String latitude;
private String longitude;
private String website;
private Collection<TypeRestau> typerestaus = new ArrayList<TypeRestau>();
private Collection<Preference> preference = new ArrayList<Preference>();
//TODO @OneToMany relier avec une collec de preferences
public Restaurant() {
@ -40,8 +42,8 @@ public class Restaurant {
// TODO Auto-generated constructor stub
}
public Restaurant(String nom, String adresse, String telephone, boolean aEmporter, boolean surPlace, int prix,
boolean accesPMR, String latitude, String longitude, String website, Collection<TypeRestau> typerestaus) {
public Restaurant(String nom, String adresse, String telephone, Boolean aEmporter, Boolean surPlace, int prix,
Boolean accesPMR, String latitude, String longitude, String website, Collection<TypeRestau> typerestaus) {
super();
this.nom = nom;
this.adresse = adresse;
@ -89,31 +91,31 @@ public class Restaurant {
this.telephone = telephone;
}
@Column(nullable = true)
public boolean isaEmporter() {
public Boolean isaEmporter() {
return aEmporter;
}
public void setaEmporter(boolean aEmporter) {
public void setaEmporter(Boolean aEmporter) {
this.aEmporter = aEmporter;
}
@Column(nullable = true)
public boolean isSurPlace() {
public Boolean isSurPlace() {
return surPlace;
}
public void setSurPlace(boolean surPlace) {
public void setSurPlace(Boolean surPlace) {
this.surPlace = surPlace;
}
@Column(nullable = true)
public int getPrix() {
public Integer getPrix() {
return prix;
}
public void setPrix(int prix) {
public void setPrix(Integer prix) {
this.prix = prix;
}
@Column(nullable = true)
public boolean isAccesPMR() {
public Boolean isAccesPMR() {
return accesPMR;
}
public void setAccesPMR(boolean accesPMR) {
public void setAccesPMR(Boolean accesPMR) {
this.accesPMR = accesPMR;
}
@Column(nullable = false)
@ -150,5 +152,17 @@ public class Restaurant {
public void setTyperestaus(Collection<TypeRestau> typerestaus) {
this.typerestaus = typerestaus;
}
@OneToMany(mappedBy = "preferencePK.restau", cascade = CascadeType.REMOVE)
@JsonIgnore
public Collection<Preference> getPreference() {
return preference;
}
public void setPreference(Collection<Preference> preference) {
this.preference = preference;
}
}

View File

@ -1,6 +1,557 @@
Nouvelle Requête POSTMAN:
20/01/2022
GET localhost:8080/restaurantbytype/1
{
"info": {
"_postman_id": "5edbac98-7561-4ccc-b517-87c01aef2a41",
"name": "Simpleat",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Personne",
"item": [
{
"name": "Accueil",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "localhost:8080/",
"host": [
"localhost"
],
"port": "8080",
"path": [
""
]
}
},
"response": []
},
{
"name": "affichPersonnes",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/users",
"host": [
"localhost"
],
"port": "8080",
"path": [
"users"
]
}
},
"response": []
},
{
"name": "AffichUnePersonne",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/user/2",
"host": [
"localhost"
],
"port": "8080",
"path": [
"user",
"2"
]
}
},
"response": []
},
{
"name": "AjoutPersonne",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"nom\": \"nouvel\",\r\n \"prenom\": \"ajout\",\r\n \"email\": \"role@ajout.fr\",\r\n \"password\": \"root\",\r\n \"roles\": [\r\n {\r\n \"id\": 2\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/add-user",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"add-user"
]
}
},
"response": []
},
{
"name": "UpdatePersonne",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 2,\r\n \"nom\": \"salut\",\r\n \"prenom\": \"enleve\",\r\n \"email\": \"nouvel@ajout.fr\",\r\n \"password\": \"root\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/update-user/2",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"update-user",
"2"
]
}
},
"response": []
},
{
"name": "DeletePersonne",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:8080/delete-user/1",
"host": [
"localhost"
],
"port": "8080",
"path": [
"delete-user",
"1"
]
}
},
"response": []
}
]
},
{
"name": "Preference",
"item": [
{
"name": "AffichPreference",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8080/preference/1/3",
"host": [
"localhost"
],
"port": "8080",
"path": [
"preference",
"1",
"3"
]
}
},
"response": []
},
{
"name": "AffichPreferences",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/preferences",
"host": [
"localhost"
],
"port": "8080",
"path": [
"preferences"
]
}
},
"response": []
},
{
"name": "Ajout preferences",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"personne\": {\r\n \"id\": 1\r\n },\r\n \"restau\": {\r\n \"id\": 5\r\n },\r\n \"note\": 5,\r\n \"favoris\": true\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8080/add-preference",
"host": [
"localhost"
],
"port": "8080",
"path": [
"add-preference"
]
}
},
"response": []
},
{
"name": "Delete preferences",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:8080/delete-preference/:idrestau/:iduser",
"host": [
"localhost"
],
"port": "8080",
"path": [
"delete-preference",
":idrestau",
":iduser"
],
"variable": [
{
"key": "idrestau",
"value": "3"
},
{
"key": "iduser",
"value": "1"
}
]
}
},
"response": []
},
{
"name": "Del prefByRestau[OUT]",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:8080/delete-pref-byrestau/3",
"host": [
"localhost"
],
"port": "8080",
"path": [
"delete-pref-byrestau",
"3"
]
}
},
"response": []
}
]
},
{
"name": "Restaurant",
"item": [
{
"name": "AffichRestaurants",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/restaurants",
"host": [
"localhost"
],
"port": "8080",
"path": [
"restaurants"
]
}
},
"response": []
},
{
"name": "AfficheUnRestaurant",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/restaurant/2",
"host": [
"localhost"
],
"port": "8080",
"path": [
"restaurant",
"2"
]
}
},
"response": []
},
{
"name": "AfficheRestoParType",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/restaurantbytype/1",
"host": [
"localhost"
],
"port": "8080",
"path": [
"restaurantbytype",
"1"
]
}
},
"response": []
},
{
"name": "AjoutRestaurant",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": " {\r\n \"nom\": \"gevaudan\",\r\n \"adresse\": \"Montreil\",\r\n \"latitude\": \"31.45571\",\r\n \"longitude\": \"34.43719\",\r\n \"typerestaus\": [\r\n {\r\n \"id\": 3\r\n },\r\n {\r\n \"id\": 4\r\n }\r\n ]\r\n }",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/add-restaurant",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"add-restaurant"
]
}
},
"response": []
},
{
"name": "UpdateRestaurant",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": " {\r\n \"id\": 2,\r\n \"nom\": \"suepr\",\r\n \"adresse\": \"93100 Montreuil\",\r\n \"telephone\": \"6809964349\",\r\n \"aEmporter\": false,\r\n \"surPlace\": true,\r\n \"prixMin\": 1.0,\r\n \"prixMax\": 17.0,\r\n \"accesPMR\": false,\r\n \"latitude\": \"31.45571\",\r\n \"longitude\": \"34.43719\",\r\n \"typerestaus\": []\r\n }",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8080/update-restaurant/2",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"update-restaurant",
"2"
]
}
},
"response": []
},
{
"name": "DeleteRestaurant",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:8080/delete-restaurant/4",
"host": [
"localhost"
],
"port": "8080",
"path": [
"delete-restaurant",
"4"
]
}
},
"response": []
}
]
},
{
"name": "Type",
"item": [
{
"name": "AffichTypes",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/types",
"host": [
"localhost"
],
"port": "8080",
"path": [
"types"
]
}
},
"response": []
},
{
"name": "Affich1Type",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8080/type/2",
"host": [
"localhost"
],
"port": "8080",
"path": [
"type",
"2"
]
}
},
"response": []
},
{
"name": "UpdateType",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 2,\r\n \"libelle\": \"creperie\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8080/update-type/2",
"host": [
"localhost"
],
"port": "8080",
"path": [
"update-type",
"2"
]
}
},
"response": []
},
{
"name": "AddType",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"libelle\": \"coucou\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8080/add-type",
"host": [
"localhost"
],
"port": "8080",
"path": [
"add-type"
]
}
},
"response": []
},
{
"name": "DeleteType",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "localhost:8080/delete-type/:id",
"host": [
"localhost"
],
"port": "8080",
"path": [
"delete-type",
":id"
],
"variable": [
{
"key": "id",
"value": "2"
}
]
}
},
"response": []
}
]
}
]
}

View File

@ -13,26 +13,65 @@ insert into personne (nom, prenom, email, password) values ('Crick', 'Andris', '
insert into role (id_role, intitule) values (1, 'Admin');
insert into role (id_role, intitule) values (2, 'User');
insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('L Perrigo Company', '301 Thierer Trail', '3092096786', false, true, 1, false, '2.1961772', '22.4708685');
insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('Sanofi Pasteur Inc.', '9 Barnett Terrace', '6809964349', false, true, 2, false, '31.45571', '34.43719');
insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('REMEDYREPACK INC.', '3 West Park', '4565542193', true, false, 3, true, '49.817777', '19.785536');
insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('Physicians Total Care, Inc.', '462 Mosinee Lane', '8521719889', false, false, 4, true, '-13.5', '48.86667');
insert into restaurant (nom, adresse, telephone, a_emporter, sur_place, prix, accespmr, latitude, longitude) values ('Triweld Industries, Inc.', '2482 Corscot Way', '7513208452', false, true, 2, true, '34.326903', '108.117456');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,0,1,1,'Le Jardin de Montreuil','1 Rue du Sergent Godefroy, 93100 Montreuil','01 41 63 92 66','http://www.lejardindemontreuil.fr/','48.853391599999995','2.4347358');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,0,'La CaVe','45 Rue de Paris, 93100 Montreuil','01 42 87 09 48','http://www.lacaveestrestaurant.com/','48.8576152','2.4342148999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (3,0,1,1,'Villa 9 Trois','71 Rue Hoche, 93100 Montreuil','01 48 58 17 37','http://www.villa9trois.com/','48.8638352','2.4331966');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'L''Amourette','54 Rue Robespierre, 93100 Montreuil','01 48 59 99 94','http://www.lamourette.fr/','48.853121599999994','2.4234494');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'La Maison Montreuil','31 Rue du Capitaine Dreyfus, 93100 Montreuil','09 87 18 18 81','https://www.lamaisonmontreuil.com/','48.859359700000006','2.4399254999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,1,'le poulet en feu','63 Rue Danton, 93100 Montreuil','09 87 51 10 90','https://www.pouletenfeu.fr/','48.8653553','2.4514297');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,0,1,1,'Les Tonneaux','62 Rue Robespierre, 93100 Montreuil','01 48 58 95 01',NULL,'48.85205','2.4238472');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Les Pianos','26 Rue Robespierre, 93100 Montreuil','09 63 53 85 17','https://www.facebook.com/lespianosmontreuilofficiel/','48.854841799999996','2.4230319');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,0,1,1,'M I M','113 Rue Marceau, 93100 Montreuil','01 43 63 31 13',NULL,'48.849849999999996','2.4265312999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,1,'Le Gévaudan','1 Bd Rouget de Lisle, 93100 Montreuil','01 42 87 42 83',NULL,'48.8617445','2.4412374');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Restaurant Filippo','6 Bd Chanzy, 93100 Montreuil','01 48 18 08 16',NULL,'48.8583964','2.4349743');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,0,1,1,'Le Mange Disc','50 Rue de Romainville, 93100 Montreuil','09 83 54 60 27','https://m.facebook.com/Le-Mange-Disc-102557926519195/?locale2=fr_FR','48.8658457','2.4466363');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,NULL,'Restaurant El Kahina','227 Rue de Paris, 93100 Montreuil','01 48 70 95 46',NULL,'48.8550124','2.4195686');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (NULL,1,1,1,'La Baraka','262 Rue de Paris, 93100 Montreuil','01 42 87 19 27','http://www.labarakamontreuil.fr/?lang=fr','48.8549268','2.4177603999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'La Bottega Della Pizza','34 Bd Rouget de Lisle, 93100 Montreuil','01 43 63 04 35','http://www.labottegadellapizza.fr/','48.860204200000005','2.4387626');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,0,1,NULL,'Restaurant de la Paix','11 Rue Armand Carrel, 93100 Montreuil','01 73 55 21 72',NULL,'48.853764','2.4177003999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'La Fontaine Bar Restaurant','47 Rue Armand Carrel, 93100 Montreuil','01 48 70 08 84','https://www.facebook.com/pages/la-fontaine-de-montreuil-Restaurant/213852528659590?fref=ts','48.8512132','2.4183881');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (3,1,1,NULL,'La Cantine Arkose Montreuil','33 Rue du Progrès, 93100 Montreuil','01 49 88 45 07','https://lacantine.arkose.com/montreuil/','48.8516335','2.419278');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (3,1,1,NULL,'Kashmir Café.','14 Rue du Capitaine Dreyfus, 93100 Montreuil','01 43 63 33 86','http://www.kashmircafe.fr/','48.8582843','2.4378471999999998');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'W Lounge','37 Rue de Valmy, 93100 Montreuil','01 48 37 61 17','http://wlounge-montreuil.com/?utm_source=gmb&utm_medium=referral','48.8507208','2.4187186');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,1,'L''Oasis','171 Rue de Paris, 93100 Montreuil','01 48 70 70 52','https://loasis-montreuil.fr/fr','48.855555599999995','2.4230556');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Obrigado','8 Av. de la Prte de Montreuil, 75020 Paris','09 84 58 24 21','http://obrigado.paris/','48.8534995','2.4118692');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Le Xanthos','30 Rue du Capitaine Dreyfus, 93100 Montreuil','01 55 86 26 77',NULL,'48.858785','2.4388468999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Thé Vert','43 Rue du Capitaine Dreyfus, 93100 Montreuil','01 42 87 79 57','http://www.thevertenligne.fr/','48.8596741','2.4405049');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Gramophone','1 Rue Pépin, 93100 Montreuil','01 49 88 74 56','http://www.restaurantlegramophone.com/','48.8641275','2.4449753');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,0,1,NULL,'La Grosse Mignonne','56 Rue Carnot, 93100 Montreuil','01 42 87 54 51','https://www.facebook.com/LaGrosseMignonne','48.855322','2.4413144');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,NULL,'La Galetiere','126 Rue de Paris, 93100 Montreuil','01 42 87 47 32','http://lagaletiere.eatbu.com/','48.8563999','2.4263293');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (3,1,1,1,'Le Mamaju','36 Rue de Lagny, 93100 Montreuil','01 83 74 02 26','https://mamaju-restaurant-montreuil.eatbu.com/','48.8490247','2.4265491');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,NULL,'Le Pizzo','15 Rue du Capitaine Dreyfus, 93100 Montreuil','09 88 46 71 29',NULL,'48.8588721','2.4385882999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,NULL,'L''Olivier','211 Rue de Paris, 93100 Montreuil','06 47 82 43 41',NULL,'48.855081','2.4203481');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Louise','27 Rue du Capitaine Dreyfus, 93100 Montreuil','06 75 32 56 81','https://instagram.com/cafelouisemontreuil?utm_medium=copy_link','48.859237','2.4394462');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,1,'Ô Bar Lié','16 Rue de la République, 93100 Montreuil','01 48 58 71 95','http://www.obarlie.com/','48.8531155','2.4209562');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,NULL,'Gabycook','27 Rue du Progrès, 93100 Montreuil',NULL,NULL,'48.851772999999994','2.4202114');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'L''ALEMBERT','268 Rue de Paris, 93100 Montreuil','01 42 87 29 61','http://www.lalembert.fr/','48.8549126','2.4174881999999998');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,NULL,'Gujarat','35 Bd Paul Vaillant Couturier, 93100 Montreuil','01 48 58 77 16','http://restaurantgujarat.fr/','48.865111','2.443053');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,NULL,'L''effiloché Montreuil','5 Rue du Centenaire, 93100 Montreuil',NULL,NULL,'48.8579636','2.4270348');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,NULL,'Famille-CMC','6 Av. Pasteur, 93100 Montreuil',NULL,NULL,'48.862999300000006','2.441328');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,NULL,'O''Villagio','28 Rue du Capitaine Dreyfus, 93100 Montreuil','01 57 42 63 82','https://ovillaggio93.wixsite.com/o-villaggio','48.858722','2.4386695');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'La Brasserie des Laitières','38 Rue de Lagny, 93100 Montreuil','01 48 51 50 70','https://le-bl.metro.biz/','48.8490399','2.4262376999999997');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (1,1,1,1,'LE HAVANE','248 Rue de Paris, 93100 Montreuil','01 48 57 17 23',NULL,'48.855091599999994','2.4187965');
INSERT INTO restaurant(prix,a_emporter,sur_place,accespmr,nom,adresse,telephone,website,latitude,longitude) VALUES (2,1,1,1,'Chez Carla','6 Rue Claude Bernard, 93100 Montreuil','01 48 18 00 53','http://www.chezcarla.fr/','48.8699343','2.4507599');
insert into preference (id_restau, id_personne, note, favori) values (2, 9, 1, false);
insert into preference (id_restau, id_personne, note, favori) values (3, 1, 5, false);
insert into preference (id_restau, id_personne, note, favori) values (1, 9, 3, true);
insert into preference (id_restau, id_personne, note, favori) values (4, 6, 2, false);
insert into preference (id_restau, id_personne, note, favori) values (5, 5, 5, false);
insert into preference (id_restau, id_personne, note, favori) values (1, 10, 1, false);
insert into preference (id_restau, id_personne, note, favori) values (5, 3, 5, false);
insert into preference (id_restau, id_personne, note, favori) values (1, 7, 1, true);
insert into preference (id_restau, id_personne, note, favori) values (4, 2, 1, false);
insert into preference (id_restau, id_personne, note, favori) values (1, 3, 5, false);
insert into preference (id_restau, id_personne, note, favori) values (3, 10, 4, false);
insert into preference (id_restau, id_personne, note, favori) values (3, 3, 4, true);
insert into preference (id_restau, id_personne, note, favori) values (2, 3, 3, false);
insert into preference (id_restau, id_personne, note, favori) values (2, 8, 3, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (2, 9, 1, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (3, 1, 5, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 9, 3, true);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (4, 6, 2, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (5, 5, 5, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 10, 1, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (5, 3, 5, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 7, 1, true);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (4, 2, 1, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (1, 3, 5, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (3, 10, 4, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (3, 3, 4, true);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (2, 3, 3, false);
insert into preference (restau_id_restau, personne_id_personne, note, favori) values (2, 8, 3, false);
insert into type (id_type, libelle) values (1, 'Kebab');
insert into type (id_type, libelle) values (2, 'Supermarché');