package dp.kotul.templategroupsbackend.model.response

import com.fasterxml.jackson.annotation.JsonProperty

data class TemplateGroupVariableDetailResponse(
        val templateGroupVariableId: Int,
        val templateVariableId: Int,
        val name: String,
        val sortOrder: Int,
        val defaultValue: String?,
        val mandatory: Boolean,
        val maxLength: Int,
        val includedInCurrentTemplate: Boolean,
        @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
        val templateVariableExtType: String,
        val value: String?
) {
    val type: TemplateVariableType? = TemplateVariableType.getTemplateVariableType(templateVariableExtType)
}
