remove tobuysbuydto

dev-backend-tobuy
Amagasu 5 months ago
parent cc1efbf179
commit e01724ace4
  1. 5
      backend/src/main/java/com/example/todoapp/controller/ToBuysController.java
  2. 20
      backend/src/main/java/com/example/todoapp/dto/ToBuysBuyDTO.java

@ -10,7 +10,6 @@ package com.example.todoapp.controller;
import com.example.todoapp.dto.DeleteToBuyRequest;
import com.example.todoapp.dto.ToBuyResponse;
import com.example.todoapp.dto.ToBuysDTO;
import com.example.todoapp.dto.ToBuysBuyDTO;
import com.example.todoapp.model.ToBuys;
import com.example.todoapp.model.User;
import com.example.todoapp.repository.UserRepository;
@ -142,8 +141,8 @@ public class ToBuysController {
@PostMapping("/{id}")
public ResponseEntity<?> buyToBuys(
Authentication authentication,
@PathVariable("id") ToBuysBuyDTO toBuysbuyDTO) {
toBuysService.buyToBuys(authentication.getName(), toBuysbuyDTO);
@PathVariable("id") ToBuysDTO toBuysDTO) {
toBuysService.buyToBuys(authentication.getName(), toBuysDTO);
return ResponseEntity.ok().build();
}

@ -1,20 +0,0 @@
package com.example.todoapp.dto;
import java.time.LocalDate;
import lombok.Data;
/**
* カテゴリDTOクラス
* このクラスはタスクのカテゴリ情報を表します
* カテゴリは名前所有ユーザーなどの情報を持ちます
*
*/
@Data
public class ToBuysBuyDTO {
private int stuff_id;
private int price;
private LocalDate exp_date;
private LocalDate last_update;
private LocalDate buy_date;
}
Loading…
Cancel
Save