1 package gr.grnet.aquarium.logic.events
3 import gr.grnet.aquarium.util.json.JsonHelpers
4 import net.liftweb.json._
8 * @author Georgios Gousios <gousiosg@gmail.com>
10 case class WalletEntry(override val id: String,
11 override val timestamp: Long,
12 related: Array[String],
17 extends AquariumEvent(id, timestamp) {
21 assert(!userId.isEmpty)
27 def fromJson(json: String): ResourceEvent = {
28 implicit val formats = JsonHelpers.DefaultJsonFormats
29 val jsonAST = parse(json)
30 Extraction.extract[ResourceEvent](jsonAST)
33 def zero = WalletEntry("", 1L, Array(),1,"","foo", false)