третья попытка((((
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.example.nto.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -20,6 +21,7 @@ public class Employee {
|
||||
private String photoUrl;
|
||||
|
||||
@OneToMany(mappedBy = "employee", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@JsonIgnore
|
||||
private List<Booking> bookingList = new ArrayList<>();
|
||||
|
||||
public Employee() {}
|
||||
@@ -32,16 +34,12 @@ public class Employee {
|
||||
|
||||
public long getId() { return id; }
|
||||
public void setId(long id) { this.id = id; }
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public String getCode() { return code; }
|
||||
public void setCode(String code) { this.code = code; }
|
||||
|
||||
public String getPhotoUrl() { return photoUrl; }
|
||||
public void setPhotoUrl(String photoUrl) { this.photoUrl = photoUrl; }
|
||||
|
||||
public List<Booking> getBookingList() { return bookingList; }
|
||||
public void setBookingList(List<Booking> bookingList) { this.bookingList = bookingList; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user