почти робит(400 ошибка)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.example.nto.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -45,4 +46,31 @@ public class Booking {
|
||||
private long id;
|
||||
private String place;
|
||||
}
|
||||
@Data
|
||||
public class CreateBookingRequest {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
private long placeId;
|
||||
}
|
||||
@Data
|
||||
public class ErrorResponse {
|
||||
private String error;
|
||||
private String message;
|
||||
|
||||
public ErrorResponse(String error, String message) {
|
||||
this.error = error;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BookingResponse {
|
||||
private Long id;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
private Long placeId;
|
||||
private String placeName;
|
||||
private Long employeeId;
|
||||
private String employeeName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user