main
Last change
on this file since fdd7961 was fdd7961, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 16 months ago |
fix many to one relations
|
-
Property mode
set to
100644
|
File size:
867 bytes
|
Rev | Line | |
---|
[3d3e59d] | 1 | package finki.paw5.model.entities;
|
---|
[d427a07] | 2 |
|
---|
[579bf6d] | 3 | import jakarta.persistence.*;
|
---|
[d427a07] | 4 | import lombok.Data;
|
---|
[fdd7961] | 5 | import lombok.RequiredArgsConstructor;
|
---|
[d427a07] | 6 |
|
---|
[579bf6d] | 7 | import java.time.LocalDate;
|
---|
| 8 |
|
---|
[d427a07] | 9 | @Data
|
---|
| 10 | @Entity
|
---|
[fdd7961] | 11 | @RequiredArgsConstructor
|
---|
[d427a07] | 12 | @Table(name = "donor")
|
---|
[579bf6d] | 13 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
| 14 | public class Donor extends User {
|
---|
[d427a07] | 15 |
|
---|
| 16 | @Column(name = "is_from_organisation", nullable = false)
|
---|
[fdd7961] | 17 | private Boolean fromOrganisation;
|
---|
[d427a07] | 18 |
|
---|
[fdfc6fa] | 19 | @Column(name = "name_organisation_donor", nullable = true, length = 100)
|
---|
[d427a07] | 20 | private String organisationName;
|
---|
| 21 |
|
---|
[fdd7961] | 22 | public Donor(LocalDate dateCreated, String name, String email,
|
---|
| 23 | String password, String telephone, Boolean fromOrganisation,
|
---|
| 24 | String organisationName) {
|
---|
[579bf6d] | 25 | super(dateCreated, name, email, password, telephone);
|
---|
| 26 | this.fromOrganisation = fromOrganisation;
|
---|
| 27 | this.organisationName = organisationName;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
[d427a07] | 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.