package org.framework.lazy.cloud.network.heartbeat.server.standalone.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.wu.framework.web.spring.EasyController;
import org.springframework.web.bind.annotation.*;
import org.wu.framework.web.response.Result;
import org.wu.framework.web.response.ResultFactory;
import org.springframework.beans.factory.annotation.Autowired;
import jakarta.annotation.Resource;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.netty.server.permeate.port.pool.LazyNettyServerPermeatePortPool;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.server.permeate.port.pool.LazyNettyServerPermeatePortPoolRemoveCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.server.permeate.port.pool.LazyNettyServerPermeatePortPoolStoryCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.server.permeate.port.pool.LazyNettyServerPermeatePortPoolUpdateCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.server.permeate.port.pool.LazyNettyServerPermeatePortPoolQueryListCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.netty.server.permeate.port.pool.LazyNettyServerPermeatePortPoolQueryOneCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyNettyServerPermeatePortPoolApplication;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyNettyServerPermeatePortPoolDTO;
import java.util.List;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
/**
 * describe 服务端内网渗透端口池 
 *
 * @author Jia wei Wu
 * @date 2024/09/17 01:26 夜间
 * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyController 
 **/
@Tag(name = "服务端内网渗透端口池提供者")
@EasyController("/lazy/netty/server/permeate/port/pool")
public class LazyNettyServerPermeatePortPoolProvider  {

    @Resource
    private LazyNettyServerPermeatePortPoolApplication lazyNettyServerPermeatePortPoolApplication;

    /**
     * describe 新增服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolStoryCommand 新增服务端内网渗透端口池     
     * @return {@link Result<LazyNettyServerPermeatePortPool>} 服务端内网渗透端口池新增后领域对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "新增服务端内网渗透端口池")
    @PostMapping("/story")
    public Result<LazyNettyServerPermeatePortPool> story(@RequestBody LazyNettyServerPermeatePortPoolStoryCommand lazyNettyServerPermeatePortPoolStoryCommand){
        return lazyNettyServerPermeatePortPoolApplication.story(lazyNettyServerPermeatePortPoolStoryCommand);
    }
    /**
     * describe 批量新增服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolStoryCommandList 批量新增服务端内网渗透端口池     
     * @return {@link Result<List<LazyNettyServerPermeatePortPool>>} 服务端内网渗透端口池新增后领域对象集合     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "批量新增服务端内网渗透端口池")
    @PostMapping("/batchStory")
    public Result<List<LazyNettyServerPermeatePortPool>> batchStory(@RequestBody List<LazyNettyServerPermeatePortPoolStoryCommand> lazyNettyServerPermeatePortPoolStoryCommandList){
        return lazyNettyServerPermeatePortPoolApplication.batchStory(lazyNettyServerPermeatePortPoolStoryCommandList);
    }
    /**
     * describe 更新服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolUpdateCommand 更新服务端内网渗透端口池     
     * @return {@link Result<LazyNettyServerPermeatePortPool>} 服务端内网渗透端口池领域对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "更新服务端内网渗透端口池")
    @PutMapping("/updateOne")
    public Result<LazyNettyServerPermeatePortPool> updateOne(@RequestBody LazyNettyServerPermeatePortPoolUpdateCommand lazyNettyServerPermeatePortPoolUpdateCommand){
        return lazyNettyServerPermeatePortPoolApplication.updateOne(lazyNettyServerPermeatePortPoolUpdateCommand);
    }
    /**
     * describe 查询单个服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolQueryOneCommand 查询单个服务端内网渗透端口池     
     * @return {@link Result<LazyNettyServerPermeatePortPoolDTO>} 服务端内网渗透端口池DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "查询单个服务端内网渗透端口池")
    @GetMapping("/findOne")
    public Result<LazyNettyServerPermeatePortPoolDTO> findOne(@ModelAttribute LazyNettyServerPermeatePortPoolQueryOneCommand lazyNettyServerPermeatePortPoolQueryOneCommand){
        return lazyNettyServerPermeatePortPoolApplication.findOne(lazyNettyServerPermeatePortPoolQueryOneCommand);
    }
    /**
     * describe 查询多个服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolQueryListCommand 查询多个服务端内网渗透端口池     
     * @return {@link Result<List<LazyNettyServerPermeatePortPoolDTO>>} 服务端内网渗透端口池DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "查询多个服务端内网渗透端口池")
    @GetMapping("/findList")
    public Result<List<LazyNettyServerPermeatePortPoolDTO>> findList(@ModelAttribute LazyNettyServerPermeatePortPoolQueryListCommand lazyNettyServerPermeatePortPoolQueryListCommand){
        return lazyNettyServerPermeatePortPoolApplication.findList(lazyNettyServerPermeatePortPoolQueryListCommand);
    }
    /**
     * describe 分页查询多个服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolQueryListCommand 分页查询多个服务端内网渗透端口池     
     * @return {@link Result<LazyPage<LazyNettyServerPermeatePortPoolDTO>>} 分页服务端内网渗透端口池DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "分页查询多个服务端内网渗透端口池")
    @GetMapping("/findPage")
    public Result<LazyPage<LazyNettyServerPermeatePortPoolDTO>> findPage(@Parameter(description ="分页大小") @RequestParam(defaultValue = "10", value = "size") int size,
                           @Parameter(description ="当前页数") @RequestParam(defaultValue = "1", value = "current") int current,@ModelAttribute LazyNettyServerPermeatePortPoolQueryListCommand lazyNettyServerPermeatePortPoolQueryListCommand){
        return lazyNettyServerPermeatePortPoolApplication.findPage(size,current,lazyNettyServerPermeatePortPoolQueryListCommand);
    }
    /**
     * describe 删除服务端内网渗透端口池
     *
     * @param lazyNettyServerPermeatePortPoolRemoveCommand 删除服务端内网渗透端口池     
     * @return {@link Result<LazyNettyServerPermeatePortPool>} 服务端内网渗透端口池     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:26 夜间
     **/

    @Operation(summary = "删除服务端内网渗透端口池")
    @DeleteMapping("/remove")
    public Result<LazyNettyServerPermeatePortPool> remove(@ModelAttribute LazyNettyServerPermeatePortPoolRemoveCommand lazyNettyServerPermeatePortPoolRemoveCommand){
        return lazyNettyServerPermeatePortPoolApplication.remove(lazyNettyServerPermeatePortPoolRemoveCommand);
    }
}