diff --git a/server/app/com/xsn/explorer/models/persisted/Block.scala b/server/app/com/xsn/explorer/models/persisted/Block.scala new file mode 100644 index 0000000..4058bf5 --- /dev/null +++ b/server/app/com/xsn/explorer/models/persisted/Block.scala @@ -0,0 +1,19 @@ +package com.xsn.explorer.models.persisted + +import com.xsn.explorer.models._ + +case class Block( + hash: Blockhash, + previousBlockhash: Option[Blockhash], + nextBlockhash: Option[Blockhash], + tposContract: Option[TransactionId], + merkleRoot: Blockhash, + size: Size, + height: Height, + version: Int, + time: Long, + medianTime: Long, + nonce: Long, + bits: String, + chainwork: String, + difficulty: BigDecimal) diff --git a/server/app/com/xsn/explorer/models/persisted/package.scala b/server/app/com/xsn/explorer/models/persisted/package.scala new file mode 100644 index 0000000..0b95b69 --- /dev/null +++ b/server/app/com/xsn/explorer/models/persisted/package.scala @@ -0,0 +1,12 @@ +package com.xsn.explorer.models + +/** + * The package represents the models that are persisted in the explorer's database. + * + * One reason why we require different models than what is used on the RPC calls + * is that there are fields which shouldn't be persisted, for example, the number + * of confirmations for a block. + */ +package object persisted { + +}