# How to construct an enum from a string?
Construct enum from
idval openStatusEnum = LotteryStatus.withId("OPEN") //Ideally convert to an option of enum val status = LotteryStatus.withIdOption("OPEN")Construct enum from
nameval closeStatusEnum = LotteryStatus.withName("Close")