package jnpf.model.cultivate.dto.position;

import jnpf.model.cultivate.po.position.FtbCultivatePositionExamIdentify;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 添加岗位学习实操鉴定
 *
 * @author fantaibao
 * @date 2023/12/17
 */
@Data
public class FtbCultivatePositionLearnPracticalDTO {
    /**
     * 鉴定表主键ID
     */
    @NotBlank(message = "未选择实操鉴定")
    private String identifyId;

    /**
     * 岗位学习主键ID
     */
    @NotBlank(message = "岗位学习主键ID不能为空")
    private String postLearnId;

    /**
     * 岗位主键ID
     */
    @NotBlank(message = "岗位主键ID不能为空")
    private String postRankId;


    public FtbCultivatePositionExamIdentify convertFtbCultivatePositionExamIdentify(FtbCultivatePositionLearnPracticalDTO ftbCultivatePositionLearnPracticalDTO) {
        if (ftbCultivatePositionLearnPracticalDTO == null) {
            return null;
        }
        FtbCultivatePositionExamIdentify ftbCultivatePositionExamIdentify = new FtbCultivatePositionExamIdentify();
        ftbCultivatePositionExamIdentify.setEnabledMark(0);
        ftbCultivatePositionExamIdentify.setIdentifyId(ftbCultivatePositionLearnPracticalDTO.getIdentifyId());
        ftbCultivatePositionExamIdentify.setPostLearnId(ftbCultivatePositionLearnPracticalDTO.getPostLearnId());
        ftbCultivatePositionExamIdentify.setPostRankId(ftbCultivatePositionLearnPracticalDTO.getPostRankId());
        return ftbCultivatePositionExamIdentify;
    }

}
