package jnpf.model.personnels.dto.black;

import jnpf.model.personnels.po.FtbPersonnelsBlacklist;
import lombok.Data;

@Data
public class FtbPersonnelsBlacklistAddDTO {

    /**
     * 用户姓名
     */
    private String userName;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 黑名单期限，0三个月，1六个月，2一年，3一年六个月，4两年，5三年，6五年，7永久
     */
    private Integer type;

    /**
     * 员工ID，页面显示
     */
    private String userSystemId;

    /**
     * 员工主键id
     */
    private String userId;

    /**
     * 所属组织名称
     */
    private String orgName;

    /**
     * 所属岗位名称
     */
    private String postName;

    /**
     * 黑名单类型id
     */
    private String blackTypeId;

    /**
     * 纳入黑名单原因
     */
    private String reason;

    public FtbPersonnelsBlacklist convertFtbPersonnelsBlacklist(FtbPersonnelsBlacklistAddDTO ftbPersonnelsBlacklistAddDTO) {
        if (ftbPersonnelsBlacklistAddDTO == null) {
            return null;
        }
        FtbPersonnelsBlacklist ftbPersonnelsBlacklist = new FtbPersonnelsBlacklist();
        ftbPersonnelsBlacklist.setUserName(ftbPersonnelsBlacklistAddDTO.getUserName());
        ftbPersonnelsBlacklist.setPhone(ftbPersonnelsBlacklistAddDTO.getPhone());
        ftbPersonnelsBlacklist.setType(ftbPersonnelsBlacklistAddDTO.getType());
        ftbPersonnelsBlacklist.setUserSystemId(ftbPersonnelsBlacklistAddDTO.getUserSystemId());
        ftbPersonnelsBlacklist.setUserId(ftbPersonnelsBlacklistAddDTO.getUserId());
        ftbPersonnelsBlacklist.setOrgName(ftbPersonnelsBlacklistAddDTO.getOrgName());
        ftbPersonnelsBlacklist.setPostName(ftbPersonnelsBlacklistAddDTO.getPostName());
        ftbPersonnelsBlacklist.setBlackTypeId(ftbPersonnelsBlacklistAddDTO.getBlackTypeId());
        ftbPersonnelsBlacklist.setReason(ftbPersonnelsBlacklistAddDTO.getReason());
        return ftbPersonnelsBlacklist;
    }

}
