|
|
|
@ -18,7 +18,7 @@ import java.time.LocalDate; |
|
|
|
|
@Data |
|
|
|
|
public class StockDTO { |
|
|
|
|
private int stock_id; |
|
|
|
|
private Stuffs stuffs; |
|
|
|
|
private int stuff_id; |
|
|
|
|
private Long user_id; |
|
|
|
|
private int amount; |
|
|
|
|
private int price; |
|
|
|
@ -35,7 +35,7 @@ public class StockDTO { |
|
|
|
|
public static StockDTO fromEntity(Stocks stock) { |
|
|
|
|
StockDTO dto = new StockDTO(); |
|
|
|
|
dto.setStock_id(stock.getStock_id()); |
|
|
|
|
dto.setStuffs(stock.getStuffs()); |
|
|
|
|
dto.setStuff_id(stock.getStuff_id()); |
|
|
|
|
dto.setUser_id(stock.getUser_id().getId()); |
|
|
|
|
dto.setAmount(stock.getAmount()); |
|
|
|
|
dto.setPrice(stock.getPrice()); |
|
|
|
|