source: src/main/java/com/example/eatys_app/model/SeSostoiOdId.java

Last change on this file was b3f2adb, checked in by Aleksandar Siljanoski <acewow3@…>, 14 months ago

Adding project to repo

  • Property mode set to 100644
File size: 1.4 KB
Line 
1package com.example.eatys_app.model;
2
3import jakarta.persistence.*;
4import lombok.AllArgsConstructor;
5import lombok.Data;
6import lombok.EqualsAndHashCode;
7import lombok.NoArgsConstructor;
8import org.hibernate.Hibernate;
9
10import java.io.Serializable;
11import java.util.Objects;
12
13@Data
14@NoArgsConstructor
15@AllArgsConstructor
16@EqualsAndHashCode
17public class SeSostoiOdId implements Serializable {
18
19 @ManyToOne
20 @JoinColumn(name = "naracka_id", nullable = false)
21 private Naracka naracka;
22
23 @ManyToOne
24 @JoinColumn(name = "obrok_id", nullable = false)
25 private Obrok obrok;
26
27// public Naracka getNarackaId() {
28// return naracka_id;
29// }
30//
31// public void setNarackaId(Naracka narackaId) {
32// this.naracka_id = narackaId;
33// }
34//
35// public Obrok getObrokId() {
36// return obrok_id;
37// }
38//
39// public void setObrokId(Obrok obrokId) {
40// this.obrok_id = obrokId;
41// }
42//
43//
44// @Override
45// public int hashCode() {
46// return Objects.hash(naracka_id,obrok_id);
47// }
48//
49// @Override
50// public boolean equals(Object o) {
51// if (this == o) return true;
52// if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
53// SeSostoiOdId entity = (SeSostoiOdId) o;
54// return Objects.equals(this.naracka_id, entity.naracka_id) && Objects.equals(this.obrok_id, entity.obrok_id);
55// }
56}
Note: See TracBrowser for help on using the repository browser.