Created
November 16, 2017 22:13
-
-
Save douglastaquary/f255279c511aa4b499354028ad39fe29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public enum Tamanho: String { | |
case individual = "INDIVIDUAL" | |
case pequeno = "PEQUENO" | |
case medio = "MEDIO" | |
case grande = "GRANDE" | |
case gigante = "GIGANTE" | |
case unico = "UNICO" | |
static func build(rawValue:String) -> Tamanho { | |
return Tamanho(rawValue: rawValue) ?? .unico | |
} | |
init(fromRawValue: String) { | |
self = Tamanho(rawValue: fromRawValue) ?? .unico | |
} | |
} | |
import Foundation | |
public enum Tipo: String { | |
case grupo = "GRUPO" | |
case mutiplaEscolha = "MULTIPLA_ESCOLHA" | |
static func build(rawValue:String) -> Tipo { | |
return Tipo(rawValue: rawValue) ?? .mutiplaEscolha | |
} | |
init(fromRawValue: String) { | |
self = Tipo(rawValue: fromRawValue) ?? .mutiplaEscolha | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment