package jnpf.model.personnels.dto.turnover;

import jnpf.model.personnels.po.FtbPersonnelsTurnoverHandover;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @Title:FtbPersonnelsTurnoverHandoverDTO
 * @Author:peng.hao
 * @create: 2024/2/711:20
 */

@Data
public class FtbPersonnelsTurnoverHandoverDTO{

    /**
     * 离职交接详情
     */
    @Length(max = 50,message = "离职交接详情不能超过50字！")
    private String handoverItems;

    /**
     * 离职交接接受人Id
     */
    private String articleRecipientId;

    /**
     * 离职交接接受人名称
     */
    private String articleRecipientName;

    /**
     * (1,物品,2工作)类型
     */
    private String turnoverType;

    /**
     * 员工ID
     */
    private String systemWokerId;

    /**
     * 工作状态
     */
    private String workerStatus;

    public static FtbPersonnelsTurnoverHandover coverFtbPersonnelsTurnoverHandover(FtbPersonnelsTurnoverHandoverDTO dto) {
        if (dto == null) {
            return null;
        }
        FtbPersonnelsTurnoverHandover ftbPersonnelsTurnoverHandover = new FtbPersonnelsTurnoverHandover();
        ftbPersonnelsTurnoverHandover.setHandoverItems(dto.getHandoverItems());
        ftbPersonnelsTurnoverHandover.setArticleRecipientId(dto.getArticleRecipientId());
        ftbPersonnelsTurnoverHandover.setArticleRecipientName(dto.getArticleRecipientName());
        ftbPersonnelsTurnoverHandover.setTurnoverType(dto.getTurnoverType());
        return ftbPersonnelsTurnoverHandover;
    }
}