source: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetBelongsToCategory.java@ ada7108

main
Last change on this file since ada7108 was ada7108, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 17 months ago

change ids from int to Integer

Co-Authored-By: SazdovaEkaterina <74919977+SazdovaEkaterina@…>

  • Property mode set to 100644
File size: 570 bytes
Line 
1package finki.paw5.model.relations;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6@Data
7@Entity
8@Table(name = "pet_belongs_to_category")
9@IdClass(PetBelongsToCategoryId.class)
10public class PetBelongsToCategory {
11
12 @Id
13 @Column(name="id_pet", nullable = false)
14 private Integer petId;
15
16 @Id
17 @Column(name="id_category", nullable = false)
18 private Integer categoryId;
19
20 public PetBelongsToCategory(int petId, int categoryId) {
21 this.petId = petId;
22 this.categoryId = categoryId;
23 }
24
25 public PetBelongsToCategory() {
26
27 }
28}
Note: See TracBrowser for help on using the repository browser.