package com.ruoyi.dk.systemconfig.enums;

import com.ruoyi.dk.systemconfig.check.ISystemConfigCheck;
import lombok.Getter;
import lombok.Setter;

/**
 * 系统动态配置枚举
 * <p>created on 2022/8/18 17:15</p>
 *
 * @author ZL
 */
public enum SystemConfigEnum {
    // TODO 限制为两位小数
    PASSWORD_ADMIN("", "公用密码",SystemConfigGroupEnum.SYSTEM),
    ;


    @Getter
    private final String defaultValue;
    @Getter
    private final String desc;
    @Getter
    private final SystemConfigGroupEnum group;
    @Setter
    @Getter
    private ISystemConfigCheck check = null;

    SystemConfigEnum(String defaultValue, String desc, SystemConfigGroupEnum group) {
        this.defaultValue = defaultValue;
        this.desc = desc;
        this.group = group;
    }

    SystemConfigEnum(String defaultValue, String desc, SystemConfigGroupEnum group, ISystemConfigCheck check) {
        this.defaultValue = defaultValue;
        this.desc = desc;
        this.group = group;
        this.check = check;
    }

    public String getKey() {
        return this.name();
    }
}
