package com.neusoft.smart.pos.user.service;

import com.neusoft.smart.pos.dto.member.request.CreateMemberRequest;
import com.neusoft.smart.pos.dto.member.response.DetailedMemberResponse;
import com.neusoft.smart.pos.dto.member.response.GetMembersResponse;
import com.neusoft.smart.pos.framework.dto.ResponseData;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "service-member")
public interface RemoteMemberService {

    @RequestMapping(value = "/members", method = RequestMethod.GET)
    ResponseData<GetMembersResponse> getMemberList(@RequestParam("org") Integer org,
                                                   @RequestParam("openId") String openId);

    @PostMapping("/members")
    ResponseData<DetailedMemberResponse> addMember(@RequestBody CreateMemberRequest request);
}
