package com.fs.aiTongueApi.domain.enums;

public enum TongueTypeEnums {

    SheZhi_xianHong("SheZhi","01","主热证，可能是身体积热过多。舌尖红有芒刺表示心火上炎；"),
    SheZhi_danBai("SheZhi","02","淡白舌而属于机体虚证、寒证之舌象。"),
    SheZhi_danHong("SheZhi","03","为正常舌色或者疾病初期舌象。"),
    SheZhi_zi("SheZhi","04","舌质带紫色，有可能是拍照原因。"),

    TaiSe_huang("TaiSe","01","主里证、热证。舌苔灰黄而干燥，表示身体有内热，耗伤津液。"),
    TaiSe_hui("TaiSe","02","主里证苔厚腻，为湿浊、痰饮。"),
    TaiSe_bai("TaiSe","03","舌苔薄白为正常舌苔或表证初起。苔白而润滑，为里寒证；"),

    Xing_boTuo("Xing","01","舌见剥落表示脏腑气阴不平衡。"),
    Xing_chiHen("Xing","02","舌见齿痕表示脾虚或湿盛证。"),
    Xing_lieWen("Xing","03","舌见裂纹提示脏腑阴血亏虚。"),

    HouDu_hou("HouDu","01","厚"),
    HouDu_bao("HouDu","02","薄");

    private final String category;
    private final String code;
    private final String description;

    TongueTypeEnums(String category, String code, String description) {
        this.category = category;
        this.code = code;
        this.description = description;
    }


    public String getCategory() {
        return category;
    }

    public String getCode() {
        return code;
    }


    public String getDescription() {
        return description;
    }


    public static String fromCategoryAndCode(String category, String code) {
        for (TongueTypeEnums type : TongueTypeEnums.values()) {
            if (type.getCategory().equals(category) && type.getCode().equals(code)) {
                return type.getDescription();
            }
        }
        return null;
    }




}
