package com.yiqi.common.enums;

public enum ClothTypes {
    thickening(1, "加厚"),
    cashmere(2, "羊绒"),
    silk(3, "真丝"),
    child(4, "儿童"),
    ;

    private final Integer code;
    private final String info;

    ClothTypes(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public static String getInfoByCode(Integer code) {
        for(ClothTypes clothTypes : ClothTypes.values()){
            if(clothTypes.getCode().equals(code)){
                return clothTypes.getInfo();
            }
        }
        return "-";
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }
}
