PromoteurMapper.java

package com.sintia.ffl.admin.optique.services.mappers;


import com.sintia.ffl.admin.optique.dal.entities.Promoteur;
import com.sintia.ffl.adminui.commons.dto.PromoteurDTO;
import com.sintia.ffl.core.services.mapper.GenericMapper;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Component;

@Component
@Mapper(componentModel = "spring")
public class PromoteurMapper implements GenericMapper<Promoteur, PromoteurDTO> {

    @Override
    public PromoteurDTO toDto(Promoteur entity) {
        return PromoteurDTO.builder()
                .id(entity.getIdPromoteur())
                .codePromoteur(entity.getCodePromoteur())
                .libellePromoteur(entity.getLibellePromoteur())
                .dateCreation(entity.getDateCreation())
                .dateMaj(entity.getDateMaj())
                .codeOptoCodeNumeroOperateur(entity.getCodeOptoCodeNumeroOperateur())
                .logoFile(entity.getLogoFile())
                .manuelFile(entity.getManuelUtilisateurFile())
                .build();
    }

    @Override
    public Promoteur toEntity(PromoteurDTO dto) {
        return null;
    }
}