source: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsTherapy.java@ d1fe9c2

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

required args constructor

  • Property mode set to 100644
File size: 564 bytes
Line 
1package finki.paw5.model.relations;
2
3import jakarta.persistence.*;
4import lombok.Data;
5import lombok.RequiredArgsConstructor;
6
7@Data
8@Entity
9@RequiredArgsConstructor
10@Table(name = "pet_needs_therapy")
11@IdClass(PetNeedsTherapyId.class)
12public class PetNeedsTherapy {
13
14 @Id
15 @Column(name="id_pet", nullable = false)
16 private Integer petId;
17
18 @Id
19 @Column(name="id_therapy", nullable = false)
20 private Integer therapyId;
21
22 public PetNeedsTherapy(int petId, int therapyId) {
23 this.petId = petId;
24 this.therapyId = therapyId;
25 }
26}
Note: See TracBrowser for help on using the repository browser.