source: Prototype Application/Paw5/src/main/java/finki/paw5/model/Shelter.java@ d427a07

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

add models and enums

  • Property mode set to 100644
File size: 1.1 KB
Line 
1package finki.paw5.model;
2
3import jakarta.persistence.Column;
4import jakarta.persistence.Entity;
5import jakarta.persistence.Id;
6import jakarta.persistence.Table;
7import lombok.Data;
8
9@Data
10@Entity
11@Table(name = "shelter")
12public 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.