main
Last change
on this file since 94308ea was d427a07, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago |
add models and enums
|
-
Property mode
set to
100644
|
File size:
764 bytes
|
Rev | Line | |
---|
[d427a07] | 1 | package finki.paw5.model;
|
---|
| 2 |
|
---|
| 3 | import jakarta.persistence.Column;
|
---|
| 4 | import jakarta.persistence.Entity;
|
---|
| 5 | import jakarta.persistence.Id;
|
---|
| 6 | import jakarta.persistence.Table;
|
---|
| 7 | import lombok.Data;
|
---|
| 8 |
|
---|
| 9 | @Data
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "donor")
|
---|
| 12 | public class Donor {
|
---|
| 13 |
|
---|
| 14 | @Id
|
---|
| 15 | @Column(name = "id_user", nullable = false)
|
---|
| 16 | private int id;
|
---|
| 17 |
|
---|
| 18 | @Column(name = "is_from_organisation", nullable = false)
|
---|
| 19 | private boolean fromOrganisation;
|
---|
| 20 |
|
---|
| 21 | @Column(name = "name_organisation", nullable = true, length = 100)
|
---|
| 22 | private String organisationName;
|
---|
| 23 |
|
---|
| 24 | public Donor(int id, boolean fromOrganisation, String organisationName) {
|
---|
| 25 | this.id = id;
|
---|
| 26 | this.fromOrganisation = fromOrganisation;
|
---|
| 27 | this.organisationName = organisationName;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | public Donor() {
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.