Merge branch 'dev' into sana

This commit is contained in:
Sana EL HIRI 2022-02-24 15:02:54 +01:00
commit 65f87cf85b
2 changed files with 27 additions and 29 deletions

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 +
'}'; '}';
} }
} }

View file

@ -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), (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); (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), INSERT INTO menu (id, date_menu, repas_midi, team_id, repas_soir) VALUES
(2, '2022-01-03', 'Kebab', 1, 1); (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');