Merge branch 'dev' of https://github.com/HediMjid/Organizee into dev
This commit is contained in:
commit
127d8d72df
|
@ -160,7 +160,7 @@ public class MembreController {
|
|||
membreRepo.deleteById(id);
|
||||
return ResponseEntity.status(HttpStatus.OK).body("Membre supprimé !");
|
||||
} catch (Exception e) {
|
||||
MembreNotFoundException membreNotFoundException = new membreNotFoundException(id);
|
||||
MembreNotFoundException membreNotFoundException = new MembreNotFoundException(id);
|
||||
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(membreNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,9 @@ public class Menu {
|
|||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
private String libelle;
|
||||
private LocalDate dateMenu;
|
||||
private String repas;
|
||||
// private int validationProposition;
|
||||
private String repasMidi;
|
||||
private String repasSoir;
|
||||
@ManyToOne
|
||||
@JoinColumn(name="TEAM_ID")
|
||||
@JsonIgnoreProperties({"menu","membre"})
|
||||
|
@ -22,10 +21,10 @@ public class Menu {
|
|||
public Menu() {
|
||||
}
|
||||
|
||||
public Menu(String libelle, LocalDate dateMenu,String repas, Team team) {
|
||||
this.libelle = libelle;
|
||||
public Menu(LocalDate dateMenu,String repasMidi, String repasSoir, Team team) {
|
||||
this.dateMenu = dateMenu;
|
||||
this.repas= repas;
|
||||
this.repasMidi= repasMidi;
|
||||
this.repasSoir= repasSoir;
|
||||
this.team = team;
|
||||
}
|
||||
|
||||
|
@ -37,14 +36,6 @@ public class Menu {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
|
||||
public void setLibelle(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public LocalDate getDateMenu() {
|
||||
return dateMenu;
|
||||
}
|
||||
|
@ -53,21 +44,21 @@ public class Menu {
|
|||
this.dateMenu = dateMenu;
|
||||
}
|
||||
|
||||
public String getRepas() {
|
||||
return repas;
|
||||
public String getRepasMidi() {
|
||||
return repasMidi;
|
||||
}
|
||||
|
||||
public void setRepas(String repas) {
|
||||
this.repas = repas;
|
||||
public void setRepasMidi(String repasMidi) {
|
||||
this.repasMidi = repasMidi;
|
||||
}
|
||||
|
||||
// public int getValidationProposition() {
|
||||
// return validationProposition;
|
||||
//}
|
||||
public String getRepasSoir() {
|
||||
return repasSoir;
|
||||
}
|
||||
|
||||
//public void setValidationProposition(int validationProposition) {
|
||||
// this.validationProposition = validationProposition;
|
||||
// }
|
||||
public void setRepasSoir(String repasSoir) {
|
||||
this.repasSoir = repasSoir;
|
||||
}
|
||||
|
||||
public Team getTeam() {
|
||||
return team;
|
||||
|
@ -77,14 +68,15 @@ public class Menu {
|
|||
this.team = team;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Menu{" +
|
||||
"id=" + id +
|
||||
", libelle='" + libelle + '\'' +
|
||||
", dateMenu=" + dateMenu +
|
||||
", repasMidi='" + repasMidi + '\'' +
|
||||
", repasSoir='" + repasSoir + '\'' +
|
||||
", team=" + team +
|
||||
", repas=" + repas +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,12 @@ INSERT INTO `evenement` (`id`, `all_day`, `start`, `end`, `text`, `membre_id`, `
|
|||
(1, 0, '2022-02-04 09:00:00', '2022-02-04 13:00:00', 'Simplon', 1, 1),
|
||||
(2, 0, '2022-02-03 12:00:00', '2022-02-03 13:00:00', 'Footing', 2, 1);
|
||||
|
||||
INSERT INTO `menu` (`id`, `date_menu`, `libelle`, `validation_proposition`, `team_id`) VALUES
|
||||
(1, '2022-01-13', 'Lasagnes', 1, 1),
|
||||
(2, '2022-01-03', 'Kebab', 1, 1);
|
||||
|
||||
INSERT INTO menu (id, date_menu, repas_midi, team_id, repas_soir) VALUES
|
||||
(1, '2022-02-21', 'canard à l orange', 4, 'pâtes au beurre'),
|
||||
(4, '2022-02-22', 'lasagnes', 4, 'riz sauté'),
|
||||
(11, '2022-02-23', 'roti de dinde orloff', 4, 'choucroute'),
|
||||
(13, '2022-02-24', 'hachis parmentier', 4, 'salade composée'),
|
||||
(15, '2022-02-25', 'legumes', 4, 'croque monsieurs'),
|
||||
(17, '2022-02-26', 'sauté de veau', 4, 'soupe et jambon'),
|
||||
(21, '2022-02-27', 'lasagnes', 4, 'pizza');
|
Loading…
Reference in New Issue