package com.interplug.qcast.biz.myInfo;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.interplug.qcast.biz.myInfo.dto.MyInfoRequest;
import com.interplug.qcast.biz.myInfo.dto.MyInfoResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestController
@RequestMapping("/api/my-info")
@RequiredArgsConstructor
@Tag(name = "MyInfoController", description = "내 정보 조회 API")
public class MyInfoController {

  private final MyInfoService myInfoService;

  /**
   * 사용자 ID의 정보 조회
   * 
   * @param myInfoRequest
   * @return
   */
  @Operation(description = "사용자 ID의 정보를 조회한다.")
  @GetMapping("/my-profile")
  @ResponseStatus(HttpStatus.OK)
  public MyInfoResponse getMyInfo(@ModelAttribute MyInfoRequest myInfoRequest) {
    return myInfoService.getMyInfo(myInfoRequest);
  }

}
