source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Donor.java@ 3d3e59d

main
Last change on this file since 3d3e59d was 3d3e59d, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago

move entity models to separate folder

  • Property mode set to 100644
File size: 974 bytes
Line 
1package finki.paw5.model.entities;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.time.LocalDate;
7
8@Data
9@Entity
10@Table(name = "donor")
11@PrimaryKeyJoinColumn(name = "id_user")
12public 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.