/* © SRSoftware 2025 */
package de.srsoftware.umbrella.user.model;

import static de.srsoftware.umbrella.core.constants.Field.USER_ID;
import static de.srsoftware.umbrella.user.Constants.*;

import de.srsoftware.tools.Mappable;
import java.util.Map;

public record ForeignLogin(String loginService, String foreingId, Long userId) implements Mappable {
	public static ForeignLogin of(String serviceName, String externalId, long userId) {
		return new ForeignLogin(serviceName,externalId,userId);
	}

	@Override
	public Map<String, Object> toMap() {
		return Map.of(SERVICE_ID,loginService,FOREIGN_ID,foreingId, USER_ID,userId);
	}
}
