package com.artfess.manage.dwd.manager.mapper;

import com.artfess.manage.dwd.manager.dto.DwdLkFamilyMemberDto;
import com.artfess.manage.dwd.model.DwdLkFamilyMember;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T09:35:56+0800",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_71 (Oracle Corporation)"
)
@Component
public class DwdLkFamilyMemberDtoMapperImpl implements DwdLkFamilyMemberDtoMapper {

    @Override
    public DwdLkFamilyMember toEntity(DwdLkFamilyMemberDto dto) {
        if ( dto == null ) {
            return null;
        }

        DwdLkFamilyMember dwdLkFamilyMember = new DwdLkFamilyMember();

        dwdLkFamilyMember.setId( dto.getId() );
        dwdLkFamilyMember.setPhone( dto.getPhone() );
        dwdLkFamilyMember.setUserId( dto.getUserId() );
        dwdLkFamilyMember.setName( dto.getName() );
        dwdLkFamilyMember.setIdCard( dto.getIdCard() );

        return dwdLkFamilyMember;
    }

    @Override
    public DwdLkFamilyMemberDto toDto(DwdLkFamilyMember entity) {
        if ( entity == null ) {
            return null;
        }

        DwdLkFamilyMemberDto dwdLkFamilyMemberDto = new DwdLkFamilyMemberDto();

        dwdLkFamilyMemberDto.setId( entity.getId() );
        dwdLkFamilyMemberDto.setPhone( entity.getPhone() );
        dwdLkFamilyMemberDto.setUserId( entity.getUserId() );
        dwdLkFamilyMemberDto.setName( entity.getName() );
        dwdLkFamilyMemberDto.setIdCard( entity.getIdCard() );

        return dwdLkFamilyMemberDto;
    }

    @Override
    public List<DwdLkFamilyMember> toEntity(List<DwdLkFamilyMemberDto> dtoList) {
        if ( dtoList == null ) {
            return null;
        }

        List<DwdLkFamilyMember> list = new ArrayList<DwdLkFamilyMember>( dtoList.size() );
        for ( DwdLkFamilyMemberDto dwdLkFamilyMemberDto : dtoList ) {
            list.add( toEntity( dwdLkFamilyMemberDto ) );
        }

        return list;
    }

    @Override
    public List<DwdLkFamilyMemberDto> toDto(List<DwdLkFamilyMember> entityList) {
        if ( entityList == null ) {
            return null;
        }

        List<DwdLkFamilyMemberDto> list = new ArrayList<DwdLkFamilyMemberDto>( entityList.size() );
        for ( DwdLkFamilyMember dwdLkFamilyMember : entityList ) {
            list.add( toDto( dwdLkFamilyMember ) );
        }

        return list;
    }
}
