This commit is contained in:
lynxwq2
2025-11-27 17:15:08 +03:00
parent 5295d49a44
commit 18172e1731
11 changed files with 74 additions and 40 deletions

View File

@@ -19,8 +19,11 @@ import java.util.List;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
private String name;
@@ -32,24 +35,9 @@ public class Employee {
@OneToMany(mappedBy = "employee", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<Booking> bookingList;
public Employee(long id, String name){
public Employee(long id, String name) {
this.id = id;
this.name = name;
}
public long getId() {
return id;
}
public String getName() {
return name;
}
public void setId(long id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
}