history: List[Word]) case class Word(id: Int, text: String, refCount: Int, lastRefTime: DateTime) case class Example(id: Int, text: String) case class DateTime(time: Long) https://github.com/cupperservice/LT-Document/tree/main/20201225
= bind[WordService] override def createWordIfNotExists(text: String): Word = { service.createIfNotExist(text) match { case Right(word) => word case Left(e) => throw e } } ... https://github.com/cupperservice/LT-Document/tree/main/20201225