package com.qs.mp.common.enums;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONType;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.qs.mp.common.json.EnumValueDeserializer;

/**
 * @author zhangkaikai
 * @create 2023-05-16 5:34 PM
 **/
@JSONType(deserializer = EnumValueDeserializer.class)
public enum CdKeyGroupStatusEnum implements IEnum<String> {

    WAITING("waiting", "待生成"),
    NO_ACTIVE("noactive", "待激活"),

    ACTIVATED("activated", "已生效"),

    INVALID("invalid", "已失效"),
    ;

    private final String value;
    private final String desc;


    CdKeyGroupStatusEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;

    }


    @Override
    public String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        JSONObject object = new JSONObject();
        object.put("value",value);
        object.put("desc", desc);
        return object.toString();
    }
}
