package jnpf.model.attendance.vo;

import lombok.Data;

import java.util.List;

/**
 * @Author huanglinpan
 * @Date 2024/8/8 10:39
 * @Version 1.0 （版本号）
 */
@Data
public class UserSettingVo {

    /** 主键Id */
    private String id;

    /** 设置主表Id */
    private String settingId;

    /** 设置名称 当type为考勤组时 该字段表示为考勤组名称*/
    private String settingName;

    /** 编码 */
    private String code;

    /** 类型 1：个人设置，2：考勤组设置 3：web全局设置 */
    private Integer type;

    /** 关联Id（与类型一起使用，个人时表示用户Id，考勤组时表示考勤组Id） */
    private String associationId;

    /** 状态 1：启用 0：关闭  默认开启*/
    private Integer status = 1;

    /** 值： 涉及定时时间时使用 类型为web全局设置的时该字段表示第几个选项（天数设置除外） */
    private Integer value;

    /** 排序 */
    private Integer sort;

    /**  父级Id */
    private String pId;

    /** 子集 */
    private List<UserSettingVo> child;

    public UserSettingVo() {
    }

    public UserSettingVo( String settingId, String settingName, String code, Integer type, String associationId,Integer sort) {
        this.settingId = settingId;
        this.settingName = settingName;
        this.code = code;
        this.type = type;
        this.associationId = associationId;
        this.sort = sort;
    }

    public UserSettingVo(String id, String settingId, String settingName, String code, Integer type, String associationId, Integer status, Integer value, List<UserSettingVo> child) {
        this.id = id;
        this.settingId = settingId;
        this.settingName = settingName;
        this.code = code;
        this.type = type;
        this.associationId = associationId;
        this.status = status;
        this.value = value;
        this.child = child;
    }

    public UserSettingVo(String settingName, Integer type, String associationId) {
        this.settingName = settingName;
        this.type = type;
        this.associationId = associationId;
    }

    public UserSettingVo(Integer type, String associationId) {
        this.type = type;
        this.associationId = associationId;
    }

    public UserSettingVo(Integer type, String associationId, Integer status, String code) {
        this.type = type;
        this.associationId = associationId;
        this.status = status;
        this.code = code;
    }
    public UserSettingVo(Integer type, String associationId, Integer status, String code,Integer value) {
        this.type = type;
        this.associationId = associationId;
        this.status = status;
        this.code = code;
        this.value = value;
    }
}
