[d427a07] | 1 | package finki.paw5.model;
|
---|
| 2 |
|
---|
| 3 | import finki.paw5.model.enumerations.AgeGroup;
|
---|
| 4 | import finki.paw5.model.enumerations.Gender;
|
---|
| 5 | import finki.paw5.model.enumerations.Size;
|
---|
| 6 | import finki.paw5.model.enumerations.Species;
|
---|
| 7 | import jakarta.persistence.Column;
|
---|
| 8 | import jakarta.persistence.Entity;
|
---|
| 9 | import jakarta.persistence.Id;
|
---|
| 10 | import jakarta.persistence.Table;
|
---|
| 11 | import lombok.Data;
|
---|
| 12 |
|
---|
| 13 | @Data
|
---|
| 14 | @Entity
|
---|
| 15 | @Table(name = "pet")
|
---|
| 16 | public class Pet {
|
---|
| 17 |
|
---|
| 18 | @Id
|
---|
[2fdea25] | 19 | @Column(name = "id_pet")
|
---|
[d427a07] | 20 | private int id;
|
---|
| 21 |
|
---|
| 22 | @Column(name = "url_pet_image", length = 200)
|
---|
| 23 | private String imageUrl;
|
---|
| 24 |
|
---|
| 25 | @Column(name = "age_group", nullable = false)
|
---|
| 26 | private AgeGroup ageGroup;
|
---|
| 27 |
|
---|
| 28 | @Column(name = "size_pet", nullable = false)
|
---|
| 29 | private Size size;
|
---|
| 30 |
|
---|
| 31 | @Column(name = "breed", length = 100)
|
---|
| 32 | private String breed;
|
---|
| 33 |
|
---|
| 34 | @Column(name = "name_pet", length = 20)
|
---|
| 35 | private String name;
|
---|
| 36 |
|
---|
| 37 | @Column(name = "species", nullable = false)
|
---|
| 38 | private Species species;
|
---|
| 39 |
|
---|
| 40 | @Column(name = "gender", nullable = false)
|
---|
| 41 | private Gender gender;
|
---|
| 42 |
|
---|
| 43 | @Column(name = "can_be_fostered", nullable = false)
|
---|
| 44 | private boolean canBeFostered;
|
---|
| 45 |
|
---|
| 46 | @Column(name = "id_adoption")
|
---|
| 47 | private int adoptionId;
|
---|
| 48 |
|
---|
| 49 | @Column(name = "id_shelter")
|
---|
| 50 | private int shelterId;
|
---|
| 51 |
|
---|
| 52 | public Pet(String imageUrl, AgeGroup ageGroup, Size size, String breed, String name, Species species, Gender gender, boolean canBeFostered, int adoptionId, int shelterId) {
|
---|
| 53 | this.imageUrl = imageUrl;
|
---|
| 54 | this.ageGroup = ageGroup;
|
---|
| 55 | this.size = size;
|
---|
| 56 | this.breed = breed;
|
---|
| 57 | this.name = name;
|
---|
| 58 | this.species = species;
|
---|
| 59 | this.gender = gender;
|
---|
| 60 | this.canBeFostered = canBeFostered;
|
---|
| 61 | this.adoptionId = adoptionId;
|
---|
| 62 | this.shelterId = shelterId;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | public Pet() {
|
---|
| 66 | }
|
---|
| 67 | }
|
---|