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