changement back sur le menu

This commit is contained in:
Blandine Bajard 2022-02-24 12:14:50 +01:00
parent 78a8b14bc9
commit 87bbec1ba1
2 changed files with 19 additions and 27 deletions

View File

@ -160,7 +160,7 @@ public class MembreController {
membreRepo.deleteById(id); membreRepo.deleteById(id);
return ResponseEntity.status(HttpStatus.OK).body("Membre supprimé !"); return ResponseEntity.status(HttpStatus.OK).body("Membre supprimé !");
} catch (Exception e) { } catch (Exception e) {
MembreNotFoundException membreNotFoundException = new membreNotFoundException(id); MembreNotFoundException membreNotFoundException = new MembreNotFoundException(id);
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(membreNotFoundException.getMessage()); return ResponseEntity.status(HttpStatus.NOT_FOUND).body(membreNotFoundException.getMessage());
} }
} }

View File

@ -10,10 +10,9 @@ public class Menu {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private int id; private int id;
private String libelle;
private LocalDate dateMenu; private LocalDate dateMenu;
private String repas; private String repasMidi;
// private int validationProposition; private String repasSoir;
@ManyToOne @ManyToOne
@JoinColumn(name="TEAM_ID") @JoinColumn(name="TEAM_ID")
@JsonIgnoreProperties({"menu","membre"}) @JsonIgnoreProperties({"menu","membre"})
@ -22,10 +21,10 @@ public class Menu {
public Menu() { public Menu() {
} }
public Menu(String libelle, LocalDate dateMenu,String repas, Team team) { public Menu(LocalDate dateMenu,String repasMidi, String repasSoir, Team team) {
this.libelle = libelle;
this.dateMenu = dateMenu; this.dateMenu = dateMenu;
this.repas= repas; this.repasMidi= repasMidi;
this.repasSoir= repasSoir;
this.team = team; this.team = team;
} }
@ -37,14 +36,6 @@ public class Menu {
this.id = id; this.id = id;
} }
public String getLibelle() {
return libelle;
}
public void setLibelle(String libelle) {
this.libelle = libelle;
}
public LocalDate getDateMenu() { public LocalDate getDateMenu() {
return dateMenu; return dateMenu;
} }
@ -53,21 +44,21 @@ public class Menu {
this.dateMenu = dateMenu; this.dateMenu = dateMenu;
} }
public String getRepas() { public String getRepasMidi() {
return repas; return repasMidi;
} }
public void setRepas(String repas) { public void setRepasMidi(String repasMidi) {
this.repas = repas; this.repasMidi = repasMidi;
} }
// public int getValidationProposition() { public String getRepasSoir() {
// return validationProposition; return repasSoir;
//} }
//public void setValidationProposition(int validationProposition) { public void setRepasSoir(String repasSoir) {
// this.validationProposition = validationProposition; this.repasSoir = repasSoir;
// } }
public Team getTeam() { public Team getTeam() {
return team; return team;
@ -77,14 +68,15 @@ public class Menu {
this.team = team; this.team = team;
} }
@Override @Override
public String toString() { public String toString() {
return "Menu{" + return "Menu{" +
"id=" + id + "id=" + id +
", libelle='" + libelle + '\'' +
", dateMenu=" + dateMenu + ", dateMenu=" + dateMenu +
", repasMidi='" + repasMidi + '\'' +
", repasSoir='" + repasSoir + '\'' +
", team=" + team + ", team=" + team +
", repas=" + repas +
'}'; '}';
} }
} }