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

main
Last change on this file since ada7108 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
Line 
1package finki.paw5.model.entities;
2
3import finki.paw5.model.enumerations.FoodType;
4import jakarta.persistence.*;
5import lombok.Data;
6
7@Data
8@Entity
9@Table(name = "food")
10public class Food {
11
12 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Column(name = "id_food")
15 private Integer id;
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.