main
Last change
on this file since cadbec3 was ada7108, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 20 months ago |
change ids from int to Integer
Co-Authored-By: SazdovaEkaterina <74919977+SazdovaEkaterina@…>
|
-
Property mode
set to
100644
|
File size:
538 bytes
|
Line | |
---|
1 | package finki.paw5.model.relations;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 |
|
---|
6 | @Data
|
---|
7 | @Entity
|
---|
8 | @Table(name = "pet_needs_therapy")
|
---|
9 | @IdClass(PetNeedsTherapyId.class)
|
---|
10 | public class PetNeedsTherapy {
|
---|
11 |
|
---|
12 | @Id
|
---|
13 | @Column(name="id_pet", nullable = false)
|
---|
14 | private Integer petId;
|
---|
15 |
|
---|
16 | @Id
|
---|
17 | @Column(name="id_therapy", nullable = false)
|
---|
18 | private Integer therapyId;
|
---|
19 |
|
---|
20 | public PetNeedsTherapy(int petId, int therapyId) {
|
---|
21 | this.petId = petId;
|
---|
22 | this.therapyId = therapyId;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public PetNeedsTherapy() {
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.