package com.engine.organization.entity.hrmresource.bo;

import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;

/**
 * @author:dxfeng
 * @createTime: 2022/07/11
 * @version: 1.0
 */
public class HrmRelationBO {
    public static HrmRelationPO convertSaveParamToPO(HrmRelationSaveParam saveParam) {
        if (null == saveParam) {
            return null;
        }
        return HrmRelationPO.builder()
                .id(saveParam.getId())
                .schemeId(saveParam.getSchemeId())
                .levelId(saveParam.getLevelId())
                .gradeId(saveParam.getGradeId())
                .sequenceId(saveParam.getSequenceId())
                .postId(saveParam.getPostId())
                .postInfoId(saveParam.getPostInfoId())
                .companyId(saveParam.getCompanyId())
                .departmentId(saveParam.getDepartmentId())
                .jobId(saveParam.getJobId())
                .build();
    }
}
