package com.ffii.fpsms.modules.stock.web

import com.ffii.fpsms.modules.purchaseOrder.entity.PurchaseOrderLine
import com.ffii.fpsms.modules.stock.entity.StockOutLine
import com.ffii.fpsms.modules.stock.entity.projection.StockOutLineInfo
import com.ffii.fpsms.modules.stock.service.StockInLineService
import com.ffii.fpsms.modules.stock.service.StockOutLineService
import jakarta.validation.Valid
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/stockOutLine")
class StockOutLineController(
    private val stockOutLineService: StockOutLineService
) {
    @GetMapping("/getByPickOrderLineId/{pickOrderLineId}")
    fun getByPurchaseOrderLineId(@Valid @PathVariable pickOrderLineId: Long): List<StockOutLineInfo> {
        return stockOutLineService.getAllStockOutLineByPickOrderLineId(pickOrderLineId)
    }

}