source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Food.java@ a762b3a

main
Last change on this file since a762b3a was ada7108, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 17 months ago

change ids from int to Integer

Co-Authored-By: SazdovaEkaterina <74919977+SazdovaEkaterina@…>

  • Property mode set to 100644
File size: 774 bytes
RevLine 
[3d3e59d]1package finki.paw5.model.entities;
[d427a07]2
3import finki.paw5.model.enumerations.FoodType;
[038c9f7]4import jakarta.persistence.*;
[d427a07]5import lombok.Data;
6
7@Data
8@Entity
9@Table(name = "food")
10public class Food {
11
12 @Id
[038c9f7]13 @GeneratedValue(strategy = GenerationType.IDENTITY)
[d427a07]14 @Column(name = "id_food")
[ada7108]15 private Integer id;
[d427a07]16
17 @Column(name = "manufacturer", nullable = false, length = 100)
18 private String manufacturer;
19
20 @Column(name = "name_food", nullable = false, length = 20)
21 private String name;
22
23 @Column(name = "type_food", nullable = false)
24 private FoodType type;
25
26 public Food(String manufacturer, String name, FoodType type) {
27 this.manufacturer = manufacturer;
28 this.name = name;
29 this.type = type;
30 }
31
32 public Food() {
33 }
34}
Note: See TracBrowser for help on using the repository browser.