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

main
Last change on this file since 3d3e59d was 3d3e59d, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago

move entity models to separate folder

  • Property mode set to 100644
File size: 770 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 int 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.