Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateShowCommand extends ShowCommand[TiyatroSeverShow] {
- protected implicit val jsonFormats = DefaultFormats
- implicit def datetimeFormatValidator(s: FieldDescriptor[String]) = new DateTimeStringValidations(s)
- val title: Field[String] = asType[String]("title").notBlank.minLength(3)
- val schedule: Field[String] = asType[String]("schedule").notBlank.minLength(8).checkDateFormat()
- val stages: Field[Seq[String]] = asType[Seq[String]]("stages").notEmpty("Empty stages are not allowed")
- }
- object ShowData extends CommandHandler {
- protected def handle: Handler = {
- case s: CreateShowCommand => add(
- TiyatroSeverShow(~s.title.value, Parsers.StringToDateTime(~s.schedule.value), idcounter.incrementAndGet(), ~s.stages.value)
- )
- }
- }
- case class TiyatroSeverShow(title: String, schedule: List[DateTime], id: Int, stages: Seq[String] = Seq(""),
- finished: Boolean = false)
- [info] Compiling 3 Scala sources to /home/sinan/dev/tiyatrosever/target/scala-2.11/classes...
- [error] /home/sinan/dev/tiyatrosever/src/main/scala/com/yokyer/tiyatrosever/data/ShowData.scala:23: could not find implicit value for parameter z: scalaz.Monoid[Seq[String]]
- [error] TiyatroSeverShow(~s.title.value, Parsers.StringToDateTime(~s.schedule.value), idcounter.incrementAndGet(), ~s.stages.value)
- [error] ^
- [error] one error found
- [error] (compile:compile) Compilation failed
- [error] Total time: 2 s, completed Aug 21, 2014 12:41:53 PM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement