package cn.stylefeng.team.meta.modular.enums;

import lombok.Getter;

@Getter
public enum GenerateSqlEnum {

    MYSQL("MYSQL", "MYSQL"),

    ORACLE("ORACLE", "ORACLE"),

    PG_SQL("PG_SQL", "PG_SQL"),

    OPEN_GAUSS("OPEN_GAUSS", "OPEN_GAUSS"),

    DAMENG("DAMENG", "DAMENG");

    private final String code;

    private final String name;

    GenerateSqlEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static GenerateSqlEnum getByCode(String code) {
        for (GenerateSqlEnum value : GenerateSqlEnum.values()) {
            if (value.getCode().equalsIgnoreCase(code)) {
                return value;
            }
        }
        return null;
    }

}
