# What goes into a DATA module?

Use the data module to define one of the following data structures:

  • data : composite dataType, equivalent to a case class.

    data Lottery(lotteryName:String,amount:Int,participantList:String*,winner:String?)
    
  • enum : enumeration data type

    enum LotteryStatus => OPEN ("Open") | CLOSE ("Close") | CANCELLED
    
  • type-alias

    type-alias LotteryRow as "com.metastay.lotterymongo.LotteryRow"
    
  • adt : abstract data type

    adt PaymentType(amount:Int) => 
    		Cheque(amount:Int,dateIssued:CalendarDate) | Cash(amount:Int)