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