package com.spring.domain.user.dto;

import com.spring.domain.user.entity.AgentUser;
import com.spring.domain.user.entity.AgentUserRole;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public class UserManagementResponse {
    
    private final String id;
    private final String userId;
    private final String userName;
    private final String email;
    private final boolean approved;
    private final AgentUserRole userRole;

    public static UserManagementResponse valueOf(AgentUser user) {
        return new UserManagementResponse(
            user.getId().toString(),
            user.getUserId(), 
            user.getName(), 
            user.getEmail(), 
            user.isApproved(),
            user.getUserRole()
        );
    }

}
