package com.oqpo.api.web.dto.response.session;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.oqpo.api.entity.oper.MemberEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

@Getter
@Setter
@Builder
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@JsonInclude(JsonInclude.Include.ALWAYS)
public class FindIdResponse {

    @ApiModelProperty(value = "사용자ID")
    private String userId;

    public static FindIdResponse toDTO(MemberEntity entity) {
        if (entity == null) return null;
        return FindIdResponse.builder()
                .userId(entity.getUserId())
                .build();
    }
}
