main
Last change
on this file since ada7108 was ada7108, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 17 months ago |
change ids from int to Integer
Co-Authored-By: SazdovaEkaterina <74919977+SazdovaEkaterina@…>
|
-
Property mode
set to
100644
|
File size:
633 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 = "donor_donates_to_organisation")
|
---|
[4846b7a] | 9 | @IdClass(DonorDonatesToOrganisationId.class)
|
---|
[d427a07] | 10 | public class DonorDonatesToOrganisation {
|
---|
| 11 |
|
---|
| 12 | @Id
|
---|
| 13 | @Column(name="id_user", nullable = false)
|
---|
[ada7108] | 14 | private Integer userId;
|
---|
[d427a07] | 15 |
|
---|
| 16 | @Id
|
---|
| 17 | @Column(name="id_organisation", nullable = false)
|
---|
[ada7108] | 18 | private Integer organisationId;
|
---|
[d427a07] | 19 |
|
---|
| 20 | public DonorDonatesToOrganisation(int userId, int organisationId) {
|
---|
| 21 | this.userId = userId;
|
---|
| 22 | this.organisationId = organisationId;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | public DonorDonatesToOrganisation() {
|
---|
| 26 |
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.