package de.szut.casino.user;

import de.szut.casino.user.dto.CreateUserDto;
import de.szut.casino.user.dto.GetUserDto;
import org.springframework.stereotype.Service;

@Service
public class UserMappingService {
    public GetUserDto mapToGetUserDto(UserEntity user) {
        return new GetUserDto(user.getKeycloakId(), user.getUsername(), user.getBalance());
    }

    public UserEntity mapToUserEntity(CreateUserDto createUserDto) {
        return new UserEntity(createUserDto.getKeycloakId(), createUserDto.getUsername(), 0);
    }
}

