package ru.vyatsu.qr_access_admin.unit.mapper;

import ru.vyatsu.qr_access_admin.unit.entity.UnitEntity;
import ru.vyatsu.qr_access_admin.unit.model.UnitComboBoxModel;

public class UnitEntityUnitComboBoxModelMapper {

    public UnitComboBoxModel toModel(UnitEntity entity) {
        if (entity == null) {
            throw new IllegalArgumentException("UnitEntity cannot be null");
        }
        return new UnitComboBoxModel(entity.getClientId(), entity.getClientName());
    }
}
