source:
Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/DonorDonatesToOrganisation.java@
7aa3382
Last change on this file since 7aa3382 was d1fe9c2, checked in by , 17 months ago | |
---|---|
|
|
File size: 639 bytes |
Rev | Line | |
---|---|---|
[d427a07] | 1 | package finki.paw5.model.relations; |
2 | ||
[4846b7a] | 3 | import jakarta.persistence.*; |
[d427a07] | 4 | import lombok.Data; |
[d1fe9c2] | 5 | import lombok.RequiredArgsConstructor; |
[d427a07] | 6 | |
7 | @Data | |
8 | @Entity | |
[d1fe9c2] | 9 | @RequiredArgsConstructor |
[d427a07] | 10 | @Table(name = "donor_donates_to_organisation") |
[4846b7a] | 11 | @IdClass(DonorDonatesToOrganisationId.class) |
[d427a07] | 12 | public class DonorDonatesToOrganisation { |
13 | ||
14 | @Id | |
15 | @Column(name="id_user", nullable = false) | |
[ada7108] | 16 | private Integer userId; |
[d427a07] | 17 | |
18 | @Id | |
19 | @Column(name="id_organisation", nullable = false) | |
[ada7108] | 20 | private Integer organisationId; |
[d427a07] | 21 | |
22 | public DonorDonatesToOrganisation(int userId, int organisationId) { | |
23 | this.userId = userId; | |
24 | this.organisationId = organisationId; | |
25 | } | |
26 | } |
Note:
See TracBrowser
for help on using the repository browser.