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
|
Line | |
---|
1 | package finki.paw5.model.entities;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 | import lombok.RequiredArgsConstructor;
|
---|
6 |
|
---|
7 | import java.time.LocalDate;
|
---|
8 |
|
---|
9 | @Data
|
---|
10 | @Entity
|
---|
11 | @RequiredArgsConstructor
|
---|
12 | @Table(name = "donor")
|
---|
13 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
14 | public class Donor extends User {
|
---|
15 |
|
---|
16 | @Column(name = "is_from_organisation", nullable = false)
|
---|
17 | private Boolean fromOrganisation;
|
---|
18 |
|
---|
19 | @Column(name = "name_organisation_donor", nullable = true, length = 100)
|
---|
20 | private String organisationName;
|
---|
21 |
|
---|
22 | public Donor(LocalDate dateCreated, String name, String email,
|
---|
23 | String password, String telephone, Boolean fromOrganisation,
|
---|
24 | String organisationName) {
|
---|
25 | super(dateCreated, name, email, password, telephone);
|
---|
26 | this.fromOrganisation = fromOrganisation;
|
---|
27 | this.organisationName = organisationName;
|
---|
28 | }
|
---|
29 |
|
---|
30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.