package jnpf.model.personnels.vo.range;

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

/**
 * @Author: peng.hao
 * @create: 2025/4/7
 */
@Data
public class FtbRangeConfigDIYVO {


    private String id;

    /** 开始区间 */
    private Integer startInterval;

    /** 结束区间 */
    private Integer endInterval;

    /** 起始值 */
    private Integer initialValue;

    /** 间隔值 */
    private Integer intervalValue;

    /** 区间计数 */
    private Integer intervalCount;

    /** 预览值(、分割) */
    private String previewValue;

    /** 以上勾选(0否1是) */
    private Integer isAbove;

    public static FtbRangeConfigDIYVO covert(FtbPersonnlesInfoDiyRangeConfig config) {
        if (config == null) {
            return null;
        }
        FtbRangeConfigDIYVO ftbRangeConfigDIYVO = new FtbRangeConfigDIYVO();
        ftbRangeConfigDIYVO.setStartInterval(config.getStartInterval());
        ftbRangeConfigDIYVO.setEndInterval(config.getEndInterval());
        ftbRangeConfigDIYVO.setInitialValue(config.getInitialValue());
        ftbRangeConfigDIYVO.setIntervalValue(config.getIntervalValue());
        ftbRangeConfigDIYVO.setIntervalCount(config.getIntervalCount());
        ftbRangeConfigDIYVO.setIsAbove(config.getIsAbove());
        ftbRangeConfigDIYVO.setPreviewValue(config.getPreviewValue());
        ftbRangeConfigDIYVO.setId(config.getId());
        return ftbRangeConfigDIYVO;
    }
}
