package cn.cslg.pas.controller;

import cn.cslg.pas.common.core.base.Constants;
import cn.cslg.pas.common.model.vo.PatentSimpleFamilyVO;
import cn.cslg.pas.common.utils.Response;
import cn.cslg.pas.service.PatentSimpleFamilyLinkService;
import cn.cslg.pas.service.PatentSimpleFamilyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 专利同族 前端控制器
 * </p>
 *
 * @author 王岩
 * @since 2022-03-02
 */
@Tag(name = "专利同族")
@RestController
@RequestMapping(Constants.API_VERSION_V2 + "/patent/family")
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class PatentFamilyController {

    private final PatentSimpleFamilyLinkService patentSimpleFamilyLinkService;

    @GetMapping("list")
    @Operation(summary = "同族列表")
    public String getPageList(PatentSimpleFamilyVO params) {
        return Response.success(patentSimpleFamilyLinkService.getPageList(params));
    }
}
