main
Last change
on this file since 4885da3 was d427a07, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 19 months ago |
add models and enums
|
-
Property mode
set to
100644
|
File size:
769 bytes
|
Line | |
---|
1 | package finki.paw5.model.relations;
|
---|
2 |
|
---|
3 | import jakarta.persistence.Column;
|
---|
4 | import jakarta.persistence.Entity;
|
---|
5 | import jakarta.persistence.Id;
|
---|
6 | import jakarta.persistence.Table;
|
---|
7 | import lombok.Data;
|
---|
8 |
|
---|
9 | @Data
|
---|
10 | @Entity
|
---|
11 | @Table(name = "pet_preferably_eats_food")
|
---|
12 | public class PetPreferablyEatsFood {
|
---|
13 |
|
---|
14 | @Id
|
---|
15 | @Column(name = "id_pet", nullable = false)
|
---|
16 | private int petId;
|
---|
17 |
|
---|
18 | @Id
|
---|
19 | @Column(name = "id_food", nullable = false)
|
---|
20 | private int foodId;
|
---|
21 |
|
---|
22 | @Column(name = "quantity_a_day", nullable = false)
|
---|
23 | private int quantityPerDay;
|
---|
24 |
|
---|
25 | public PetPreferablyEatsFood(int petId, int foodId, int quantityPerDay) {
|
---|
26 | this.petId = petId;
|
---|
27 | this.foodId = foodId;
|
---|
28 | this.quantityPerDay = quantityPerDay;
|
---|
29 | }
|
---|
30 |
|
---|
31 | public PetPreferablyEatsFood() {
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.