package com.ankaibei.workFlow.common.flow.model;

import com.ankaibei.workFlow.common.flow.model.FlowCategory.FlowCategoryModelMapper;
import com.ankaibei.workFlow.common.flow.vo.FlowCategoryVo;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T14:15:52+0800",
    comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_144 (Oracle Corporation)"
)
public class FlowCategory$FlowCategoryModelMapperImpl implements FlowCategoryModelMapper {

    @Override
    public FlowCategoryVo fromModel(FlowCategory arg0) {
        if ( arg0 == null ) {
            return null;
        }

        FlowCategoryVo flowCategoryVo = new FlowCategoryVo();

        flowCategoryVo.setCategoryId( arg0.getCategoryId() );
        flowCategoryVo.setName( arg0.getName() );
        flowCategoryVo.setCode( arg0.getCode() );
        flowCategoryVo.setUpdateTime( arg0.getUpdateTime() );
        flowCategoryVo.setUpdateUserId( arg0.getUpdateUserId() );
        flowCategoryVo.setCreateTime( arg0.getCreateTime() );
        flowCategoryVo.setCreateUserId( arg0.getCreateUserId() );

        return flowCategoryVo;
    }

    @Override
    public List<FlowCategoryVo> fromModelList(List<FlowCategory> arg0) {
        if ( arg0 == null ) {
            return null;
        }

        List<FlowCategoryVo> list = new ArrayList<FlowCategoryVo>( arg0.size() );
        for ( FlowCategory flowCategory : arg0 ) {
            list.add( fromModel( flowCategory ) );
        }

        return list;
    }

    @Override
    public FlowCategory toModel(FlowCategoryVo arg0) {
        if ( arg0 == null ) {
            return null;
        }

        FlowCategory flowCategory = new FlowCategory();

        flowCategory.setCategoryId( arg0.getCategoryId() );
        flowCategory.setName( arg0.getName() );
        flowCategory.setCode( arg0.getCode() );
        flowCategory.setUpdateTime( arg0.getUpdateTime() );
        flowCategory.setUpdateUserId( arg0.getUpdateUserId() );
        flowCategory.setCreateTime( arg0.getCreateTime() );
        flowCategory.setCreateUserId( arg0.getCreateUserId() );

        return flowCategory;
    }

    @Override
    public List<FlowCategory> toModelList(List<FlowCategoryVo> arg0) {
        if ( arg0 == null ) {
            return null;
        }

        List<FlowCategory> list = new ArrayList<FlowCategory>( arg0.size() );
        for ( FlowCategoryVo flowCategoryVo : arg0 ) {
            list.add( toModel( flowCategoryVo ) );
        }

        return list;
    }
}
