package jnpf.model.cultivate.vo.apply;

import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.model.cultivate.po.apply.FtbCultivatePromotionPostApply;
import jnpf.model.cultivate.vo.promotion.FtbCultivatePromotionVO;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @Title:FtbCultivatePromotionPostApplyVO
 * @Author:peng.hao
 * @create: 2023/12/2515:54
 */
@Data
public class FtbCultivatePromotionPostApplyVO {
    /**
     * 主键id
     */
    @Schema(title = "主键id")
    private String id;
    /**
     * 用户id
     */
    @Schema(title = "用户id")
    private String userId;
    /**
     * 用户名称
     */
    @Schema(title = "用户名称")
    private String userName;


    /**
     * 当前岗位id
     */
    private String postId;

    /**
     * 当前岗位名称
     */
    private String postName;


    /**
     * 当前岗位职等id
     */
    @Schema(title = "当前岗位职等id")
    private String postRankId;

    /**
     * 当前岗位职等名称
     */
    private String postRankName;

    /**
     * 晋升岗位id
     */
    @Schema(title = "晋升岗位id")
    private String postPromotionId;
    /**
     * 晋升岗位名称
     */
    private String postPromotionName;
    /**
     * 晋升岗位职等id
     */
    private String postRankPromotionId;

    /**
     * 晋升岗位职等名称
     */
    private String postRankPromotionName;

    /**
     * 晋升组织主键id
     */
    private String orgId;
    /**
     * 晋升组织名称
     */
    private String orgName;

    /**
     * 当前晋升组织主键id
     */
    private String orgCurrentId;
    /**
     * 晋升组织名称
     */
    private String orgCurrentName;

    /**
     * 晋升原因
     */
    @Schema(title = "晋升原因")
    private String promotionReason;


    /**
     * 申请来源,0web,1app
     */
    @Schema(title = "申请来源,0web,1app")
    private Integer source;


    /**
     * 创建用户
     */
    @Schema(title = "创建用户" )
    private String creatorUserId;


    /**
     * 审核状态，0代审核,1审核通过,2审核不通过
     */
    @Schema(title = "审核状态，0代审核,1审核通过,2审核不通过")
    private Integer state;

    /**
     * 晋升通道包含多个晋升通道
     *
     */
    @Schema(description = "晋升通道")
    private List<FtbCultivatePromotionVO> channelInfos;

    /**
     * 晋升通道个数
     *
     */
    @Schema(description = "晋升通道个数")
    private Integer channelCount;

    /**
     * 申请时间
     */
    @Schema(title = "申请时间" )
    private Date creatorTime;

    /**
     * 审核时间
     */
    @Schema(title = "审核时间" )
    private Date lastModifyTime;


    public static FtbCultivatePromotionPostApplyVO coverFtbCultivatePromotionPostApplyVO(FtbCultivatePromotionPostApply vo) {
        if (vo == null) {
            return null;
        }
        FtbCultivatePromotionPostApplyVO ftbCultivatePromotionPostApplyVO = new FtbCultivatePromotionPostApplyVO();
        ftbCultivatePromotionPostApplyVO.setPostId(vo.getPostId());
        ftbCultivatePromotionPostApplyVO.setPostName(vo.getPostName());
        ftbCultivatePromotionPostApplyVO.setUserId(vo.getUserId());
        ftbCultivatePromotionPostApplyVO.setUserName(vo.getUserName());
        ftbCultivatePromotionPostApplyVO.setPromotionReason(vo.getPromotionReason());
        ftbCultivatePromotionPostApplyVO.setState(vo.getState());
        ftbCultivatePromotionPostApplyVO.setSource(vo.getSource());
        ftbCultivatePromotionPostApplyVO.setPostRankId(vo.getPostRankId());
        ftbCultivatePromotionPostApplyVO.setPostRankName(vo.getPostRankName());
        ftbCultivatePromotionPostApplyVO.setPostPromotionId(vo.getPostPromotionId());
        ftbCultivatePromotionPostApplyVO.setPostPromotionName(vo.getPostPromotionName());
        ftbCultivatePromotionPostApplyVO.setPostRankPromotionId(vo.getPostRankPromotionId());
        ftbCultivatePromotionPostApplyVO.setPostRankPromotionName(vo.getPostRankPromotionName());
        ftbCultivatePromotionPostApplyVO.setOrgId(vo.getOrgId());
        ftbCultivatePromotionPostApplyVO.setOrgName(vo.getOrgName());
        ftbCultivatePromotionPostApplyVO.setOrgCurrentId(vo.getOrgCurrentId());
        ftbCultivatePromotionPostApplyVO.setOrgCurrentName(vo.getOrgCurrentName());
        ftbCultivatePromotionPostApplyVO.setId(vo.getId());
        ftbCultivatePromotionPostApplyVO.setLastModifyTime(vo.getLastModifyTime());
        ftbCultivatePromotionPostApplyVO.setCreatorTime(vo.getCreatorTime());
        ftbCultivatePromotionPostApplyVO.setCreatorUserId(vo.getCreatorUserId());
        return ftbCultivatePromotionPostApplyVO;
    }
}
