package cokr.xit.ens.modules.ktsigntalk.direct.model.struct;

import cokr.xit.ens.core.mapstruct.GenericMapper;
import cokr.xit.ens.core.mapstruct.StructMapperConfig;
import cokr.xit.ens.modules.ktsigntalk.direct.model.TmpltMngKtSigntalkDTO;
import cokr.xit.ens.modules.ktsigntalk.direct.domain.TmpltMngKtSigntalk;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = StructMapperConfig.class)
public interface TmpltMngKtSigntalkMapper extends GenericMapper<TmpltMngKtSigntalkDTO, TmpltMngKtSigntalk> {


    @Override
    @Mapping(target = "orgMng.orgCd", source = "orgCd")
    TmpltMngKtSigntalk toEntity(TmpltMngKtSigntalkDTO tmpltMngktSigntalkDTO);

    @Override
    @Mapping(target = "orgCd", expression = "java(tmpltMngKtSigntalk.getOrgMng().getOrgCd())")
    TmpltMngKtSigntalkDTO toDto(TmpltMngKtSigntalk tmpltMngKtSigntalk);


}
