source: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetBelongsToCategory.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: 628 bytes
Line 
1package finki.paw5.model.relations;
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 = "pet_belongs_to_category")
12public class PetBelongsToCategory {
13
14 @Id
15 @Column(name="id_pet", nullable = false)
16 private int petId;
17
18 @Id
19 @Column(name="id_category", nullable = false)
20 private int categoryId;
21
22 public PetBelongsToCategory(int petId, int categoryId) {
23 this.petId = petId;
24 this.categoryId = categoryId;
25 }
26
27 public PetBelongsToCategory() {
28
29 }
30}
Note: See TracBrowser for help on using the repository browser.