diff --git a/server/app/com/xsn/explorer/data/BalanceDataHandler.scala b/server/app/com/xsn/explorer/data/BalanceDataHandler.scala index d1e78a6..ae2c247 100644 --- a/server/app/com/xsn/explorer/data/BalanceDataHandler.scala +++ b/server/app/com/xsn/explorer/data/BalanceDataHandler.scala @@ -4,7 +4,8 @@ import com.alexitc.playsonify.core.ApplicationResult import com.alexitc.playsonify.models.ordering.FieldOrdering import com.alexitc.playsonify.models.pagination.{Limit, PaginatedQuery, PaginatedResult} import com.xsn.explorer.models.fields.BalanceField -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.persisted.Balance import scala.language.higherKinds diff --git a/server/app/com/xsn/explorer/data/anorm/BalancePostgresDataHandler.scala b/server/app/com/xsn/explorer/data/anorm/BalancePostgresDataHandler.scala index 1ea1b45..5a4cabe 100644 --- a/server/app/com/xsn/explorer/data/anorm/BalancePostgresDataHandler.scala +++ b/server/app/com/xsn/explorer/data/anorm/BalancePostgresDataHandler.scala @@ -7,7 +7,8 @@ import com.xsn.explorer.data.BalanceBlockingDataHandler import com.xsn.explorer.data.anorm.dao.BalancePostgresDAO import com.xsn.explorer.errors.BalanceUnknownError import com.xsn.explorer.models.fields.BalanceField -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.persisted.Balance import javax.inject.Inject import org.scalactic.{Good, One, Or} import play.api.db.Database diff --git a/server/app/com/xsn/explorer/data/anorm/LedgerPostgresDataHandler.scala b/server/app/com/xsn/explorer/data/anorm/LedgerPostgresDataHandler.scala index fdd6c3c..56dcd6c 100644 --- a/server/app/com/xsn/explorer/data/anorm/LedgerPostgresDataHandler.scala +++ b/server/app/com/xsn/explorer/data/anorm/LedgerPostgresDataHandler.scala @@ -7,8 +7,8 @@ import com.alexitc.playsonify.models.ApplicationError import com.xsn.explorer.data.LedgerBlockingDataHandler import com.xsn.explorer.data.anorm.dao.{AggregatedAmountPostgresDAO, BalancePostgresDAO, BlockPostgresDAO, TransactionPostgresDAO} import com.xsn.explorer.errors.{PostgresForeignKeyViolationError, PreviousBlockMissingError, RepeatedBlockHeightError} -import com.xsn.explorer.models.persisted.{Block, Transaction} -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.persisted.{Balance, Block, Transaction} +import com.xsn.explorer.models.Address import com.xsn.explorer.util.Extensions.ListOptionExt import javax.inject.Inject import org.scalactic.Good diff --git a/server/app/com/xsn/explorer/data/anorm/dao/BalancePostgresDAO.scala b/server/app/com/xsn/explorer/data/anorm/dao/BalancePostgresDAO.scala index 6eecd88..0c48c51 100644 --- a/server/app/com/xsn/explorer/data/anorm/dao/BalancePostgresDAO.scala +++ b/server/app/com/xsn/explorer/data/anorm/dao/BalancePostgresDAO.scala @@ -8,7 +8,8 @@ import com.alexitc.playsonify.models.pagination.{Count, Limit, PaginatedQuery} import com.alexitc.playsonify.sql.FieldOrderingSQLInterpreter import com.xsn.explorer.data.anorm.parsers.BalanceParsers._ import com.xsn.explorer.models.fields.BalanceField -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.persisted.Balance import javax.inject.Inject import org.slf4j.LoggerFactory diff --git a/server/app/com/xsn/explorer/data/anorm/parsers/BalanceParsers.scala b/server/app/com/xsn/explorer/data/anorm/parsers/BalanceParsers.scala index 5c85345..73d7e78 100644 --- a/server/app/com/xsn/explorer/data/anorm/parsers/BalanceParsers.scala +++ b/server/app/com/xsn/explorer/data/anorm/parsers/BalanceParsers.scala @@ -2,7 +2,7 @@ package com.xsn.explorer.data.anorm.parsers import anorm.SqlParser._ import anorm._ -import com.xsn.explorer.models.Balance +import com.xsn.explorer.models.persisted.Balance object BalanceParsers { diff --git a/server/app/com/xsn/explorer/data/async/BalanceFutureDataHandler.scala b/server/app/com/xsn/explorer/data/async/BalanceFutureDataHandler.scala index 689b8d7..44f83ce 100644 --- a/server/app/com/xsn/explorer/data/async/BalanceFutureDataHandler.scala +++ b/server/app/com/xsn/explorer/data/async/BalanceFutureDataHandler.scala @@ -7,7 +7,8 @@ import com.alexitc.playsonify.models.pagination.PaginatedQuery import com.xsn.explorer.data.{BalanceBlockingDataHandler, BalanceDataHandler} import com.xsn.explorer.executors.DatabaseExecutionContext import com.xsn.explorer.models.fields.BalanceField -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.persisted.Balance import javax.inject.Inject import scala.concurrent.Future diff --git a/server/app/com/xsn/explorer/models/Balance.scala b/server/app/com/xsn/explorer/models/persisted/Balance.scala similarity index 86% rename from server/app/com/xsn/explorer/models/Balance.scala rename to server/app/com/xsn/explorer/models/persisted/Balance.scala index 01527cc..01c1017 100644 --- a/server/app/com/xsn/explorer/models/Balance.scala +++ b/server/app/com/xsn/explorer/models/persisted/Balance.scala @@ -1,5 +1,6 @@ -package com.xsn.explorer.models +package com.xsn.explorer.models.persisted +import com.xsn.explorer.models.Address import play.api.libs.json._ case class Balance( diff --git a/server/app/com/xsn/explorer/services/AddressService.scala b/server/app/com/xsn/explorer/services/AddressService.scala index 5258798..77d41df 100644 --- a/server/app/com/xsn/explorer/services/AddressService.scala +++ b/server/app/com/xsn/explorer/services/AddressService.scala @@ -4,8 +4,8 @@ import com.alexitc.playsonify.core.FutureOr.Implicits.{FutureOps, OrOps} import com.alexitc.playsonify.core.{ApplicationResult, FutureApplicationResult} import com.xsn.explorer.data.async.{BalanceFutureDataHandler, TransactionFutureDataHandler} import com.xsn.explorer.errors.AddressFormatError -import com.xsn.explorer.models.persisted.Transaction -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.persisted.{Balance, Transaction} +import com.xsn.explorer.models.Address import javax.inject.Inject import org.scalactic.{One, Or} diff --git a/server/app/com/xsn/explorer/services/BalanceService.scala b/server/app/com/xsn/explorer/services/BalanceService.scala index 2592171..58d3b07 100644 --- a/server/app/com/xsn/explorer/services/BalanceService.scala +++ b/server/app/com/xsn/explorer/services/BalanceService.scala @@ -7,7 +7,8 @@ import com.alexitc.playsonify.models.pagination.{Limit, Offset, PaginatedQuery} import com.alexitc.playsonify.validators.PaginatedQueryValidator import com.xsn.explorer.data.async.BalanceFutureDataHandler import com.xsn.explorer.errors.AddressFormatError -import com.xsn.explorer.models.{Address, Balance, WrappedResult} +import com.xsn.explorer.models.persisted.Balance +import com.xsn.explorer.models.{Address, WrappedResult} import com.xsn.explorer.parsers.BalanceOrderingParser import javax.inject.Inject import org.scalactic.{Good, One, Or} diff --git a/server/test/com/xsn/explorer/data/BalancePostgresDataHandlerSpec.scala b/server/test/com/xsn/explorer/data/BalancePostgresDataHandlerSpec.scala index f4a3fd4..7b3ed24 100644 --- a/server/test/com/xsn/explorer/data/BalancePostgresDataHandlerSpec.scala +++ b/server/test/com/xsn/explorer/data/BalancePostgresDataHandlerSpec.scala @@ -7,8 +7,8 @@ import com.xsn.explorer.data.anorm.BalancePostgresDataHandler import com.xsn.explorer.data.anorm.dao.BalancePostgresDAO import com.xsn.explorer.data.common.PostgresDataHandlerSpec import com.xsn.explorer.helpers.DataHelper -import com.xsn.explorer.models.Balance import com.xsn.explorer.models.fields.BalanceField +import com.xsn.explorer.models.persisted.Balance import org.scalactic.Good class BalancePostgresDataHandlerSpec extends PostgresDataHandlerSpec { diff --git a/server/test/com/xsn/explorer/data/StatisticsPostgresDataHandlerSpec.scala b/server/test/com/xsn/explorer/data/StatisticsPostgresDataHandlerSpec.scala index 0a1c7d6..e0f7608 100644 --- a/server/test/com/xsn/explorer/data/StatisticsPostgresDataHandlerSpec.scala +++ b/server/test/com/xsn/explorer/data/StatisticsPostgresDataHandlerSpec.scala @@ -5,7 +5,8 @@ import com.xsn.explorer.data.anorm.dao.{BalancePostgresDAO, StatisticsPostgresDA import com.xsn.explorer.data.anorm.{BalancePostgresDataHandler, StatisticsPostgresDataHandler} import com.xsn.explorer.data.common.PostgresDataHandlerSpec import com.xsn.explorer.helpers.DataHelper -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.persisted.Balance import org.scalatest.OptionValues._ class StatisticsPostgresDataHandlerSpec extends PostgresDataHandlerSpec { diff --git a/server/test/com/xsn/explorer/helpers/BalanceDummyDataHandler.scala b/server/test/com/xsn/explorer/helpers/BalanceDummyDataHandler.scala index afcfe9a..d9076f4 100644 --- a/server/test/com/xsn/explorer/helpers/BalanceDummyDataHandler.scala +++ b/server/test/com/xsn/explorer/helpers/BalanceDummyDataHandler.scala @@ -6,7 +6,8 @@ import com.alexitc.playsonify.models.pagination import com.alexitc.playsonify.models.pagination.{PaginatedQuery, PaginatedResult} import com.xsn.explorer.data.BalanceBlockingDataHandler import com.xsn.explorer.models.fields.BalanceField -import com.xsn.explorer.models.{Address, Balance} +import com.xsn.explorer.models.Address +import com.xsn.explorer.models.persisted.Balance class BalanceDummyDataHandler extends BalanceBlockingDataHandler { diff --git a/server/test/controllers/AddressesControllerSpec.scala b/server/test/controllers/AddressesControllerSpec.scala index 6a6751c..de702d2 100644 --- a/server/test/controllers/AddressesControllerSpec.scala +++ b/server/test/controllers/AddressesControllerSpec.scala @@ -8,7 +8,7 @@ import com.xsn.explorer.data.{BalanceBlockingDataHandler, TransactionBlockingDat import com.xsn.explorer.helpers.{BalanceDummyDataHandler, DataHelper, TransactionDummyDataHandler} import com.xsn.explorer.models._ import com.xsn.explorer.models.fields.TransactionField -import com.xsn.explorer.models.persisted.Transaction +import com.xsn.explorer.models.persisted.{Balance, Transaction} import com.xsn.explorer.util.Extensions.BigDecimalExt import controllers.common.MyAPISpec import org.scalactic.Good diff --git a/server/test/controllers/BalancesControllerSpec.scala b/server/test/controllers/BalancesControllerSpec.scala index 1d9c2bd..0a5571d 100644 --- a/server/test/controllers/BalancesControllerSpec.scala +++ b/server/test/controllers/BalancesControllerSpec.scala @@ -5,8 +5,8 @@ import com.alexitc.playsonify.models.ordering.FieldOrdering import com.alexitc.playsonify.models.pagination._ import com.xsn.explorer.data.BalanceBlockingDataHandler import com.xsn.explorer.helpers.{BalanceDummyDataHandler, DataHelper} -import com.xsn.explorer.models.Balance import com.xsn.explorer.models.fields.BalanceField +import com.xsn.explorer.models.persisted.Balance import controllers.common.MyAPISpec import org.scalactic.Good import play.api.inject.bind