package org.dromara.app;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.system.domain.SysVersion;
import org.dromara.system.domain.bo.SysVersionBo;
import org.dromara.system.domain.vo.SysVersionVo;
import org.dromara.system.service.ISysVerisonService;
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;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/version")
public class AppVersionController {


    private final ISysVerisonService sysVerisonService;

    @Operation(summary = "查询app版本管理")
    @PostMapping("/page")
    public R<IPage<SysVersionVo>> list(@RequestBody SysVersionBo query, Page<SysVersion> page){
        return R.ok(sysVerisonService.getList(page,query));
    }

}
