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

import com.ffii.fpsms.modules.stock.service.StockOutService
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
data class Status(
    val status: String
)
@RestController
@RequestMapping("/stockOut")
class StockOutController(
    private val stockOutService: StockOutService
) {
    @GetMapping("/get-status/{consoCode}")
    fun getConsoStatus(@PathVariable consoCode: String): Status {
        val status = stockOutService.getConsoStatus(consoCode)
        return Status(status)
    }
}