package org.jeecg.modules.system.app.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import org.jeecg.common.system.annotation.EnumDict;

/**
 * 意见反馈类型枚举
 */
@EnumDict("feedbackType")
public enum FeedbackTypeEnum {
//   0-投诉吐槽；1-功能异常；2-用户体验；3-功能建议；4-其他
    TSTC(0, "投诉吐槽"),
    GNYC(1, "功能异常"),
    YHTY(2, "用户体验"),
    GNJY(3, "功能建议"),
    QT(4, "其他");

    @EnumValue
    Integer code;
    @JsonValue
    String name;
    FeedbackTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
    public static FeedbackTypeEnum getByCode(Integer code) {
        for (FeedbackTypeEnum value : values()) {
            if (value.code.equals(code) ) {
                return value;
            }
        }
        return null;
    }
}
