main
Last change
on this file since 4885da3 was d427a07, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 19 months ago |
add models and enums
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
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 = "shelter")
|
---|
12 | public class Shelter {
|
---|
13 |
|
---|
14 | @Id
|
---|
15 | @Column(name = "id_shelter")
|
---|
16 | private int id;
|
---|
17 |
|
---|
18 | @Column(name = "address_shelter", nullable = false, length = 100)
|
---|
19 | private String address;
|
---|
20 |
|
---|
21 | @Column(name = "telephone_shelter", nullable = false, length = 20)
|
---|
22 | private String telephone;
|
---|
23 |
|
---|
24 | @Column(name = "id_organisation")
|
---|
25 | private int organisationId;
|
---|
26 |
|
---|
27 | @Column(name = "name_shelter", nullable = false, length = 100)
|
---|
28 | private String name;
|
---|
29 |
|
---|
30 | @Column(name = "email_shelter", nullable = false, length = 100, unique = true)
|
---|
31 | private String email;
|
---|
32 |
|
---|
33 | public Shelter(String address, String telephone, int organisationId, String name, String email) {
|
---|
34 | this.address = address;
|
---|
35 | this.telephone = telephone;
|
---|
36 | this.organisationId = organisationId;
|
---|
37 | this.name = name;
|
---|
38 | this.email = email;
|
---|
39 | }
|
---|
40 |
|
---|
41 | public Shelter() {
|
---|
42 | }
|
---|
43 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.