package com.kamco.cd.kamcoback.members.service;

import com.kamco.cd.kamcoback.members.dto.SignInRequest;
import com.kamco.cd.kamcoback.postgres.core.MembersCoreService;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class AuthService {

  private final MembersCoreService membersCoreService;

  /**
   * 로그인 일시 저장
   *
   * @param uuid
   */
  @Transactional
  public void saveLogin(UUID uuid) {
    membersCoreService.saveLogin(uuid);
  }

  /**
   * 사용자 상태 조회
   *
   * @param request
   * @return
   */
  public String getUserStatus(SignInRequest request) {
    return membersCoreService.getUserStatus(request);
  }
}
