package sgc.portal.cw.cw0804.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0804.dto.CW08040001USearch;
import sgc.portal.cw.cw0804.model.CW08040001U;
import sgc.portal.cw.cw0804.service.CW08040001UService;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/cw/cw0804")
public class CW08040001UController {
    private final CW08040001UService service;

    public CW08040001UController(CW08040001UService service) {
        this.service = service;
    }
    
    @PostMapping("/CW08040001U/romInfo")
    public List<EasyHashMap<String, Object>> getRomInfo(@RequestBody CW08040001USearch search) {
        return service.getRomInfo(search);
    }
    
    @PostMapping("/CW08040001U/listDay")
    public List<EasyHashMap<String, Object>> getListDay(@RequestBody CW08040001USearch search) {
        return service.getListDay(search);
    }
    
    @PostMapping("/CW08040001U/listRom")
    public List<EasyHashMap<String, Object>> getListRom(@RequestBody CW08040001USearch search) {
        return service.getListRom(search);
    }
    
    @PostMapping("/CW08040001U/listRem")
    public List<EasyHashMap<String, Object>> getListRem(@RequestBody CW08040001USearch search) {
        return service.getListRem(search);
    }
    
    @PostMapping("/CW08040001U/selectRom")
    public List<EasyHashMap<String, Object>> getSelectRom(@RequestBody CW08040001USearch search) {
        return service.getSelectRom(search);
    }
    
    @PostMapping("/CW08040001U/selectLoc")
    public List<EasyHashMap<String, Object>> getSelectLoc(@RequestBody CW08040001USearch search) {
        return service.getSelectLoc(search);
    }

    @PostMapping("/CW08040001U/save")
    public Map<String, String> save(@RequestBody List<CW08040001U> CW08040001U) {
    	return service.save(CW08040001U);
    }
}
