main
Last change
on this file since c049fd6 was c049fd6, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 13 months ago |
specify project schema in the backend
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | package finki.paw5.model.entities;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 | import lombok.RequiredArgsConstructor;
|
---|
6 |
|
---|
7 | import java.util.List;
|
---|
8 |
|
---|
9 | @Data
|
---|
10 | @Entity
|
---|
11 | @RequiredArgsConstructor
|
---|
12 | @Table(name = "vet_clinic", schema = "project")
|
---|
13 | public class VetClinic {
|
---|
14 |
|
---|
15 | @Id
|
---|
16 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
17 | @Column(name = "id_vet_clinic")
|
---|
18 | private Integer id;
|
---|
19 |
|
---|
20 | @Column(name = "telephone_vet_clinic", nullable = false, length = 20)
|
---|
21 | private String telephone;
|
---|
22 |
|
---|
23 | @Column(name = "address_vet_clinic", nullable = false, length = 100)
|
---|
24 | private String address;
|
---|
25 |
|
---|
26 | @Column(name = "name_vet_clinic", nullable = false, length = 100)
|
---|
27 | private String name;
|
---|
28 |
|
---|
29 | @ManyToMany
|
---|
30 | @JoinTable(name = "pet_needs_intervention_in_vet_clinic",
|
---|
31 | joinColumns = @JoinColumn(name = "id_vet_clinic"),
|
---|
32 | inverseJoinColumns = @JoinColumn(name = "id_pet"))
|
---|
33 | List<Pet> pets;
|
---|
34 |
|
---|
35 | public VetClinic(String telephone, String address, String name) {
|
---|
36 | this.telephone = telephone;
|
---|
37 | this.address = address;
|
---|
38 | this.name = name;
|
---|
39 | }
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.