package com.ningdatech.carapi.driver.controller;


import com.ningdatech.basic.model.PageVo;
import com.ningdatech.carapi.driver.manage.ExamRecordManage;
import com.ningdatech.carapi.driver.model.po.ReqListExamRecordPO;
import com.ningdatech.carapi.driver.model.vo.ResListExamRecordVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Liuxinxin
 * @since 2022-10-26
 */
@RequestMapping("/api/v1/exam-record")
@RestController
@Api(tags = "考试记录")
@Validated
@RequiredArgsConstructor
public class ExamRecordController {
    private final ExamRecordManage examRecordManage;

    @PostMapping("/list")
    @ApiOperation("培训考试列表筛选")
    public PageVo<ResListExamRecordVO> listExamRecord(@Valid @RequestBody ReqListExamRecordPO request) {
        return examRecordManage.listExamRecord(request);
    }
}
