package dp.kotul.templategroupsbackend.model.response

enum class TemplateVariableType(val templateVariableExtTypes: List<String>) {
    TEXT(listOf("string", "text", "TEXT")),
    LONG_TEXT(listOf("longtext"));

    companion object {
        fun getTemplateVariableType(templateVariableExtType: String): TemplateVariableType? {
            values().forEach {
                if (it.templateVariableExtTypes.contains(templateVariableExtType)) {
                    return it
                }
            }
            return null
        }
    }
}
