package com.github.microservice.auth.client.service;

import com.github.microservice.auth.client.content.ResultContent;
import com.github.microservice.auth.client.model.UserNFCCardUpdateModel;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "authserver/manager/userNFCCard")
public interface UserNFCCardService {

    @Operation(summary = "更新绑定NFC卡号", description = "更新绑定NFC卡号")
    @RequestMapping(value = "update", method = RequestMethod.POST)
    ResultContent update(@RequestBody UserNFCCardUpdateModel userNFCCardUpdateModel);

    @Operation(summary = "删除用户NFC卡号", description = "删除用户NFC卡号")
    @RequestMapping(value = "delete", method = RequestMethod.POST)
    ResultContent delete(@RequestParam("userId") String userId, @RequestParam("nfcCard") String nfcCard);

    @Operation(summary = "获取用户NFC卡号", description = "获取用户NFC卡号")
    @RequestMapping(value = "get", method = RequestMethod.POST)
    ResultContent<List<String>> get(@RequestParam("userId") String userId);

    @Operation(summary = "通过卡号查询用户", description = "通过卡号查询用户")
    @RequestMapping(value = "matches", method = RequestMethod.POST)
    ResultContent<String> matches(@RequestParam("nfcCard") String nfcCard);
}
