package com.eactive.eai.rms.onl.manage.authserver.tokenissuance;

import com.eactive.eai.data.entity.onl.authserver.TokenIssuanceLog;
import com.eactive.eai.data.mapper.GenericMapper;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TokenIssuanceLogUIMapper extends GenericMapper<TokenIssuanceLogUI, TokenIssuanceLog> {

    @Override
    @Mapping(source = "id", target = "id")
    @Mapping(source = "clientId", target = "clientId")
    @Mapping(source = "appName", target = "appName")
    @Mapping(source = "successYn", target = "successYn")
    @Mapping(source = "ipAddress", target = "ipAddress")
    @Mapping(source = "orgId", target = "orgId")
    @Mapping(source = "orgName", target = "orgName")
    @Mapping(source = "grantType", target = "grantType")
    @Mapping(source = "scope", target = "scope")
    @Mapping(source = "restrictionExemptYn", target = "restrictionExemptYn")
    @Mapping(source = "resultMessage", target = "resultMessage")
    @Mapping(source = "issuanceDateTime", target = "issuanceDateTime")
    @Mapping(source = "accessToken", target = "accessToken")
    TokenIssuanceLogUI toVo(TokenIssuanceLog entity);
}