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

import com.artfess.manage.duty.manager.dto.CmgtDutyOrgWorkarrangeDto;
import com.artfess.manage.duty.model.CmgtDutyOrgWorkarrange;
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:57+0800",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_71 (Oracle Corporation)"
)
@Component
public class CmgtDutyOrgWorkarrangeDtoMapperImpl implements CmgtDutyOrgWorkarrangeDtoMapper {

    @Override
    public CmgtDutyOrgWorkarrange toEntity(CmgtDutyOrgWorkarrangeDto dto) {
        if ( dto == null ) {
            return null;
        }

        CmgtDutyOrgWorkarrange cmgtDutyOrgWorkarrange = new CmgtDutyOrgWorkarrange();

        cmgtDutyOrgWorkarrange.setCreateBy( dto.getCreateBy() );
        cmgtDutyOrgWorkarrange.setCreateOrgId( dto.getCreateOrgId() );
        cmgtDutyOrgWorkarrange.setCreateTime( dto.getCreateTime() );
        cmgtDutyOrgWorkarrange.setUpdateBy( dto.getUpdateBy() );
        cmgtDutyOrgWorkarrange.setUpdateTime( dto.getUpdateTime() );
        cmgtDutyOrgWorkarrange.setId( dto.getId() );
        cmgtDutyOrgWorkarrange.setName( dto.getName() );
        cmgtDutyOrgWorkarrange.setTeamId( dto.getTeamId() );
        cmgtDutyOrgWorkarrange.setOrgId( dto.getOrgId() );
        cmgtDutyOrgWorkarrange.setSn( dto.getSn() );
        cmgtDutyOrgWorkarrange.setMemo( dto.getMemo() );
        cmgtDutyOrgWorkarrange.setIsDele( dto.getIsDele() );
        cmgtDutyOrgWorkarrange.setVersion( dto.getVersion() );
        cmgtDutyOrgWorkarrange.setLastTime( dto.getLastTime() );

        return cmgtDutyOrgWorkarrange;
    }

    @Override
    public CmgtDutyOrgWorkarrangeDto toDto(CmgtDutyOrgWorkarrange entity) {
        if ( entity == null ) {
            return null;
        }

        CmgtDutyOrgWorkarrangeDto cmgtDutyOrgWorkarrangeDto = new CmgtDutyOrgWorkarrangeDto();

        cmgtDutyOrgWorkarrangeDto.setCreateBy( entity.getCreateBy() );
        cmgtDutyOrgWorkarrangeDto.setCreateOrgId( entity.getCreateOrgId() );
        cmgtDutyOrgWorkarrangeDto.setCreateTime( entity.getCreateTime() );
        cmgtDutyOrgWorkarrangeDto.setUpdateBy( entity.getUpdateBy() );
        cmgtDutyOrgWorkarrangeDto.setUpdateTime( entity.getUpdateTime() );
        cmgtDutyOrgWorkarrangeDto.setId( entity.getId() );
        cmgtDutyOrgWorkarrangeDto.setName( entity.getName() );
        cmgtDutyOrgWorkarrangeDto.setTeamId( entity.getTeamId() );
        cmgtDutyOrgWorkarrangeDto.setOrgId( entity.getOrgId() );
        cmgtDutyOrgWorkarrangeDto.setSn( entity.getSn() );
        cmgtDutyOrgWorkarrangeDto.setMemo( entity.getMemo() );
        cmgtDutyOrgWorkarrangeDto.setIsDele( entity.getIsDele() );
        cmgtDutyOrgWorkarrangeDto.setVersion( entity.getVersion() );
        cmgtDutyOrgWorkarrangeDto.setLastTime( entity.getLastTime() );

        return cmgtDutyOrgWorkarrangeDto;
    }

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

        List<CmgtDutyOrgWorkarrange> list = new ArrayList<CmgtDutyOrgWorkarrange>( dtoList.size() );
        for ( CmgtDutyOrgWorkarrangeDto cmgtDutyOrgWorkarrangeDto : dtoList ) {
            list.add( toEntity( cmgtDutyOrgWorkarrangeDto ) );
        }

        return list;
    }

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

        List<CmgtDutyOrgWorkarrangeDto> list = new ArrayList<CmgtDutyOrgWorkarrangeDto>( entityList.size() );
        for ( CmgtDutyOrgWorkarrange cmgtDutyOrgWorkarrange : entityList ) {
            list.add( toDto( cmgtDutyOrgWorkarrange ) );
        }

        return list;
    }
}
