main
Last change
on this file since 29c4253 was 3d3e59d, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago |
move entity models to separate folder
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[3d3e59d] | 1 | package finki.paw5.model.entities;
|
---|
[d427a07] | 2 |
|
---|
[038c9f7] | 3 | import jakarta.persistence.*;
|
---|
[d427a07] | 4 | import lombok.Data;
|
---|
| 5 |
|
---|
| 6 | @Data
|
---|
| 7 | @Entity
|
---|
| 8 | @Table(name = "shelter")
|
---|
| 9 | public class Shelter {
|
---|
| 10 |
|
---|
| 11 | @Id
|
---|
[038c9f7] | 12 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
[d427a07] | 13 | @Column(name = "id_shelter")
|
---|
| 14 | private int id;
|
---|
| 15 |
|
---|
| 16 | @Column(name = "address_shelter", nullable = false, length = 100)
|
---|
| 17 | private String address;
|
---|
| 18 |
|
---|
| 19 | @Column(name = "telephone_shelter", nullable = false, length = 20)
|
---|
| 20 | private String telephone;
|
---|
| 21 |
|
---|
| 22 | @Column(name = "id_organisation")
|
---|
| 23 | private int organisationId;
|
---|
| 24 |
|
---|
| 25 | @Column(name = "name_shelter", nullable = false, length = 100)
|
---|
| 26 | private String name;
|
---|
| 27 |
|
---|
| 28 | @Column(name = "email_shelter", nullable = false, length = 100, unique = true)
|
---|
| 29 | private String email;
|
---|
| 30 |
|
---|
| 31 | public Shelter(String address, String telephone, int organisationId, String name, String email) {
|
---|
| 32 | this.address = address;
|
---|
| 33 | this.telephone = telephone;
|
---|
| 34 | this.organisationId = organisationId;
|
---|
| 35 | this.name = name;
|
---|
| 36 | this.email = email;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | public Shelter() {
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.