forked from Olympic/NTO-2025-Backend-TeamTask
1
This commit is contained in:
14
src/main/java/com/example/nto/controller/RootController.java
Normal file
14
src/main/java/com/example/nto/controller/RootController.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.example.nto.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class RootController {
|
||||||
|
|
||||||
|
@GetMapping("/")
|
||||||
|
public String home() {
|
||||||
|
return "Application is running";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
37
src/main/java/com/example/nto/dto/BookingInfoDto.java
Normal file
37
src/main/java/com/example/nto/dto/BookingInfoDto.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package com.example.nto.dto;
|
||||||
|
|
||||||
|
import com.example.nto.entity.Booking;
|
||||||
|
|
||||||
|
public class BookingInfoDto {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String place;
|
||||||
|
|
||||||
|
public BookingInfoDto() {}
|
||||||
|
|
||||||
|
public BookingInfoDto(Booking booking) {
|
||||||
|
this.id = booking.getId();
|
||||||
|
this.place = booking.getPlace().getPlace();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BookingInfoDto(Long id, String place) {
|
||||||
|
this.id = id;
|
||||||
|
this.place = place;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlace() {
|
||||||
|
return place;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlace(String place) {
|
||||||
|
this.place = place;
|
||||||
|
}
|
||||||
|
}
|
||||||
25
src/main/java/com/example/nto/dto/BookingRequestDto.java
Normal file
25
src/main/java/com/example/nto/dto/BookingRequestDto.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package com.example.nto.dto;
|
||||||
|
|
||||||
|
public class BookingRequestDto {
|
||||||
|
|
||||||
|
private String date;
|
||||||
|
private Long placeId;
|
||||||
|
|
||||||
|
public BookingRequestDto() {}
|
||||||
|
|
||||||
|
public String getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPlaceId() {
|
||||||
|
return placeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(String date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlaceId(Long placeId) {
|
||||||
|
this.placeId = placeId;
|
||||||
|
}
|
||||||
|
}
|
||||||
42
src/main/java/com/example/nto/dto/EmployeeInfoDto.java
Normal file
42
src/main/java/com/example/nto/dto/EmployeeInfoDto.java
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package com.example.nto.dto;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class EmployeeInfoDto {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private String photoUrl;
|
||||||
|
private Map<String, BookingInfoDto> booking;
|
||||||
|
|
||||||
|
public EmployeeInfoDto() {}
|
||||||
|
|
||||||
|
public EmployeeInfoDto(String name, String photoUrl, Map<String, BookingInfoDto> booking) {
|
||||||
|
this.name = name;
|
||||||
|
this.photoUrl = photoUrl;
|
||||||
|
this.booking = booking;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoUrl() {
|
||||||
|
return photoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, BookingInfoDto> getBooking() {
|
||||||
|
return booking;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoUrl(String photoUrl) {
|
||||||
|
this.photoUrl = photoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBooking(Map<String, BookingInfoDto> booking) {
|
||||||
|
this.booking = booking;
|
||||||
|
}
|
||||||
|
}
|
||||||
30
src/main/java/com/example/nto/dto/FreePlaceDto.java
Normal file
30
src/main/java/com/example/nto/dto/FreePlaceDto.java
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
package com.example.nto.dto;
|
||||||
|
|
||||||
|
public class FreePlaceDto {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String place;
|
||||||
|
|
||||||
|
public FreePlaceDto() {}
|
||||||
|
|
||||||
|
public FreePlaceDto(Long id, String place) {
|
||||||
|
this.id = id;
|
||||||
|
this.place = place;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlace() {
|
||||||
|
return place;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlace(String place) {
|
||||||
|
this.place = place;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user