package com.qsoft.rs.sincoar.dominio.mapper;

import com.qsoft.rs.sincoar.model.Tarmagenciasucursal;
import com.qsoft.rs.sincoar.dto.TarmagenciasucursalDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface TarmagenciasucursalMapper {

    TarmagenciasucursalMapper INSTANCE = Mappers.getMapper(TarmagenciasucursalMapper.class);
    @Mapping(source = "personcode", target = "personcode.personcode")
    @Mapping(source = "tgenecatalogdetail", target = "tgenecatalogdetail.tgenecatalogdetailPK.catalog")
    @Mapping(source = "tgenecatalogdetail1", target = "tgenecatalogdetail1.tgenecatalogdetailPK.catalog")
    @Mapping(source = "tgenecity", target = "tgenecity.tgenecityPK.citycode")
    @Mapping(source = "tgeneparroquia", target = "tgeneparroquia.tgeneparroquiaPK.parroquiacode")
    Tarmagenciasucursal getEntidad(TarmagenciasucursalDTO tarmagenciasucursal);

    
    @Mapping(target = "personcode", source = "personcode.personcode")
    @Mapping(target = "tgenecatalogdetail", source = "tgenecatalogdetail.tgenecatalogdetailPK.catalog")
    @Mapping(target = "tgenecatalogdetail1", source = "tgenecatalogdetail1.tgenecatalogdetailPK.catalog")
    @Mapping(target = "tgenecity", source = "tgenecity.tgenecityPK.citycode")
    @Mapping(target = "tgeneparroquia", source = "tgeneparroquia.tgeneparroquiaPK.parroquiacode")
    TarmagenciasucursalDTO getDto(Tarmagenciasucursal tarmagenciasucursal);

}