aboutsummaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2015-02-07 23:57:36 +0100
committerPacien TRAN-GIRARD2015-02-07 23:57:36 +0100
commit3d22cb7d1ee6bdf7b484bbf001c76e81ae351dea (patch)
tree69470d595030a0f0abce97e779db99ff8e21425a /app/models
parentde24f5b788c1ae6307eb360877ea3ce61c8f7a6a (diff)
downloadminibay-3d22cb7d1ee6bdf7b484bbf001c76e81ae351dea.tar.gz
Update accounts view to include usernames
Diffstat (limited to 'app/models')
-rw-r--r--app/models/Views.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/Views.scala b/app/models/Views.scala
index a76b043..438c1d3 100644
--- a/app/models/Views.scala
+++ b/app/models/Views.scala
@@ -18,21 +18,24 @@ trait Views {
18 18
19 /** Entity class storing rows of table Accounts 19 /** Entity class storing rows of table Accounts
20 * @param userUuid Database column user_uuid DBType(varchar), Length(36,true), Default(None) 20 * @param userUuid Database column user_uuid DBType(varchar), Length(36,true), Default(None)
21 * @param username Database column username DBType(varchar), Length(20,true), Default(None)
21 * @param balance Database column balance DBType(numeric), Default(None) 22 * @param balance Database column balance DBType(numeric), Default(None)
22 * @param openBids Database column open_bids DBType(numeric), Default(None) 23 * @param openBids Database column open_bids DBType(numeric), Default(None)
23 * @param equity Database column equity DBType(numeric), Default(None) */ 24 * @param equity Database column equity DBType(numeric), Default(None) */
24 case class Account(userUuid: Option[String] = None, balance: Option[scala.math.BigDecimal] = None, openBids: Option[scala.math.BigDecimal] = None, equity: Option[scala.math.BigDecimal] = None) 25 case class Account(userUuid: Option[String] = None, username: Option[String] = None, balance: Option[scala.math.BigDecimal] = None, openBids: Option[scala.math.BigDecimal] = None, equity: Option[scala.math.BigDecimal] = None)
25 /** GetResult implicit for fetching Account objects using plain SQL queries */ 26 /** GetResult implicit for fetching Account objects using plain SQL queries */
26 implicit def GetResultAccount(implicit e0: GR[Option[String]], e1: GR[Option[scala.math.BigDecimal]]): GR[Account] = GR{ 27 implicit def GetResultAccount(implicit e0: GR[Option[String]], e1: GR[Option[scala.math.BigDecimal]]): GR[Account] = GR{
27 prs => import prs._ 28 prs => import prs._
28 Account.tupled((<<?[String], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal])) 29 Account.tupled((<<?[String], <<?[String], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal]))
29 } 30 }
30 /** Table description of table accounts. Objects of this class serve as prototypes for rows in queries. */ 31 /** Table description of table accounts. Objects of this class serve as prototypes for rows in queries. */
31 class Accounts(_tableTag: Tag) extends Table[Account](_tableTag, "accounts") { 32 class Accounts(_tableTag: Tag) extends Table[Account](_tableTag, "accounts") {
32 def * = (userUuid, balance, openBids, equity) <> (Account.tupled, Account.unapply) 33 def * = (userUuid, username, balance, openBids, equity) <> (Account.tupled, Account.unapply)
33 34
34 /** Database column user_uuid DBType(varchar), Length(36,true), Default(None) */ 35 /** Database column user_uuid DBType(varchar), Length(36,true), Default(None) */
35 val userUuid: Column[Option[String]] = column[Option[String]]("user_uuid", O.Length(36,varying=true), O.Default(None)) 36 val userUuid: Column[Option[String]] = column[Option[String]]("user_uuid", O.Length(36,varying=true), O.Default(None))
37 /** Database column username DBType(varchar), Length(20,true), Default(None) */
38 val username: Column[Option[String]] = column[Option[String]]("username", O.Length(20,varying=true), O.Default(None))
36 /** Database column balance DBType(numeric), Default(None) */ 39 /** Database column balance DBType(numeric), Default(None) */
37 val balance: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("balance", O.Default(None)) 40 val balance: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("balance", O.Default(None))
38 /** Database column open_bids DBType(numeric), Default(None) */ 41 /** Database column open_bids DBType(numeric), Default(None) */