третья попытка((((

This commit is contained in:
2025-11-29 20:11:44 +03:00
parent 0fc0678392
commit c4afce7fa6
5 changed files with 19 additions and 47 deletions

View File

@@ -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; }
}