source:
Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsTherapy.java@
d396372
Last change on this file since d396372 was ada7108, checked in by , 17 months ago | |
---|---|
|
|
File size: 538 bytes |
Rev | Line | |
---|---|---|
[d427a07] | 1 | package finki.paw5.model.relations; |
2 | ||
[4846b7a] | 3 | import jakarta.persistence.*; |
[d427a07] | 4 | import lombok.Data; |
5 | ||
6 | @Data | |
7 | @Entity | |
8 | @Table(name = "pet_needs_therapy") | |
[4846b7a] | 9 | @IdClass(PetNeedsTherapyId.class) |
[d427a07] | 10 | public class PetNeedsTherapy { |
11 | ||
12 | @Id | |
13 | @Column(name="id_pet", nullable = false) | |
[ada7108] | 14 | private Integer petId; |
[d427a07] | 15 | |
16 | @Id | |
17 | @Column(name="id_therapy", nullable = false) | |
[ada7108] | 18 | private Integer therapyId; |
[d427a07] | 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.