package jnpf.model.cultivate.vo.promotion;

import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.model.cultivate.po.promotion.FtbCultivatePromotionPost;
import lombok.Data;

/**
 * @Title:FtbCultivatePromotionPostVO
 * @Author:peng.hao
 * @create: 2023/12/1714:08
 */
@Data
public class FtbCultivatePromotionPostVO {

    /**
     * 晋升通道级别主键id
     */
    @Schema(description = "晋升通道级别主键id 新增不填 修改填写")
    private String promotionPostId;

    /**
     * 晋升通道主键id
     */
    @Schema(description = "晋升通道主键id")
    private String promotionId;

    /**
     * 通道初始岗位id
     */
    @Schema(description = "岗位id")
    private String postId;
    /**
     * 通道初始岗位名称
     */
    @Schema(description = "岗位名称")
    private String postName;

    /**
     * 岗位等级，初始岗位为1,岗位级别越高，位置就越靠后，级别数就越大
     */
    @Schema(description = "岗位等级，初始岗位为1,岗位级别越高，位置就越靠后，级别数就越大")
    private Integer channelLevel;


    /**
     * 是否启用当前晋升通道(0,为未启动,1为启动)
     */
    @Schema(description = "是否启用当前晋升通道(0,为未启动,1为启动)")
    private String enableStatus;

    /**
     * 是否为当前岗位标记
     */
    private String flag;

    public static FtbCultivatePromotionPost coverFtbCultivatePromotionPostVO(FtbCultivatePromotionPostVO vo) {
        if (vo == null) {
            return null;
        }
        FtbCultivatePromotionPost ftbCultivatePromotionPost = new FtbCultivatePromotionPost();
        ftbCultivatePromotionPost.setId(vo.getPromotionPostId());
        ftbCultivatePromotionPost.setPromotionId(vo.getPromotionId());
        ftbCultivatePromotionPost.setPostId(vo.getPostId());
        ftbCultivatePromotionPost.setPostName(vo.getPostName());
        ftbCultivatePromotionPost.setLevel(vo.getChannelLevel());
        return ftbCultivatePromotionPost;
    }
}
