package jnpf.model.personnels.vo.resignation;

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

@Data
public class FtbResignationConfigurationVO {

    /**
     * 离职配置id
     */
    private String configId;

    /**
     * 离职原因
     */
    private String resignationName;

    /**
     * 是否选中，0选中,1未选中
     */
    private Integer checked;

    /**
     * 离职类别名称
     */
    private String resignationTypeName;

    /**
     * 是否对员工可见
     * 0否，1是
     */
    private Integer isVisible;

    /**
     * 类型(1 系统默认 2 自定义)
     */
    private Integer systemType;


    public static FtbResignationConfigurationVO convert(FtbPersonnelsResignationConfiguration faction) {
        if (faction == null) {
            return null;
        }
        FtbResignationConfigurationVO ftbResignationConfigurationVO = new FtbResignationConfigurationVO();
        ftbResignationConfigurationVO.setConfigId(faction.getId());
        ftbResignationConfigurationVO.setResignationName(faction.getResignationName());
        ftbResignationConfigurationVO.setChecked(faction.getChecked());
        ftbResignationConfigurationVO.setIsVisible(faction.getIsVisible());
        ftbResignationConfigurationVO.setSystemType(faction.getSystemType());
        return ftbResignationConfigurationVO;
    }

}
