package pwc.taxtech.atms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dpo.ModelProfileDto;
import pwc.taxtech.atms.service.impl.ModelConfigurationServiceImpl;

import java.util.List;

@RestController
@RequestMapping(value = "api/v1/modelConfiguration")
public class ModelConfigurationController {

    @Autowired
    ModelConfigurationServiceImpl modelConfigurationService;

    @RequestMapping(value = "/model/byIndustry/{serviceTypeId}/{industryId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public @ResponseBody
    List<ModelProfileDto> getModelListByIndustry(@PathVariable String industryId,
                                                 @PathVariable String serviceTypeId) {
        return modelConfigurationService.getModelListByIndustry(serviceTypeId, industryId);
    }
}