1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
package models
// AUTO-GENERATED Slick data model
/** Stand-alone Slick data model for immediate use */
object Views extends {
val profile = play.api.db.slick.Config.driver
} with Views
/** Slick data model trait for extension, choice of backend or usage in the cake pattern. (Make sure to initialize this late.) */
trait Views {
val profile: scala.slick.driver.JdbcProfile
import profile.simple._
import scala.slick.model.ForeignKeyAction
// NOTE: GetResult mappers for plain SQL are only generated for tables where Slick knows how to map the types of all columns.
import scala.slick.jdbc.{GetResult => GR}
/** DDL for all tables. Call .create to execute. */
lazy val ddl = Accounts.ddl ++ Sales.ddl
/** Entity class storing rows of table Accounts
* @param userUuid Database column user_uuid DBType(varchar), Length(36,true), Default(None)
* @param username Database column username DBType(varchar), Length(20,true), Default(None)
* @param balance Database column balance DBType(numeric), Default(None)
* @param openBids Database column open_bids DBType(numeric), Default(None)
* @param equity Database column equity DBType(numeric), Default(None) */
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)
/** GetResult implicit for fetching Account objects using plain SQL queries */
implicit def GetResultAccount(implicit e0: GR[Option[String]], e1: GR[Option[scala.math.BigDecimal]]): GR[Account] = GR{
prs => import prs._
Account.tupled((<<?[String], <<?[String], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal]))
}
/** Table description of table accounts. Objects of this class serve as prototypes for rows in queries. */
class Accounts(_tableTag: Tag) extends Table[Account](_tableTag, "accounts") {
def * = (userUuid, username, balance, openBids, equity) <> (Account.tupled, Account.unapply)
/** Database column user_uuid DBType(varchar), Length(36,true), Default(None) */
val userUuid: Column[Option[String]] = column[Option[String]]("user_uuid", O.Length(36,varying=true), O.Default(None))
/** Database column username DBType(varchar), Length(20,true), Default(None) */
val username: Column[Option[String]] = column[Option[String]]("username", O.Length(20,varying=true), O.Default(None))
/** Database column balance DBType(numeric), Default(None) */
val balance: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("balance", O.Default(None))
/** Database column open_bids DBType(numeric), Default(None) */
val openBids: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("open_bids", O.Default(None))
/** Database column equity DBType(numeric), Default(None) */
val equity: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("equity", O.Default(None))
}
/** Collection-like TableQuery object for table Accounts */
lazy val Accounts = new TableQuery(tag => new Accounts(tag))
/** Entity class storing rows of table Sales
* @param itemUuid Database column item_uuid DBType(varchar), Length(36,true), Default(None)
* @param itemName Database column item_name DBType(varchar), Length(20,true), Default(None)
* @param sellerUuid Database column seller_uuid DBType(varchar), Length(36,true), Default(None)
* @param startDate Database column start_date DBType(timestamptz), Default(None)
* @param endDate Database column end_date DBType(timestamptz), Default(None)
* @param bestBidUuid Database column best_bid_uuid DBType(varchar), Length(36,true), Default(None)
* @param bestBidderUuid Database column best_bidder_uuid DBType(varchar), Length(36,true), Default(None)
* @param initialPrice Database column initial_price DBType(numeric), Default(None)
* @param bestOffer Database column best_offer DBType(numeric), Default(None)
* @param charges Database column charges DBType(numeric), Default(None) */
case class Sale(itemUuid: Option[String] = None, itemName: Option[String] = None, sellerUuid: Option[String] = None, startDate: Option[java.sql.Timestamp] = None, endDate: Option[java.sql.Timestamp] = None, bestBidUuid: Option[String] = None, bestBidderUuid: Option[String] = None, initialPrice: Option[scala.math.BigDecimal] = None, bestOffer: Option[scala.math.BigDecimal] = None, charges: Option[scala.math.BigDecimal] = None)
/** GetResult implicit for fetching Sale objects using plain SQL queries */
implicit def GetResultSale(implicit e0: GR[Option[String]], e1: GR[Option[java.sql.Timestamp]], e2: GR[Option[scala.math.BigDecimal]]): GR[Sale] = GR{
prs => import prs._
Sale.tupled((<<?[String], <<?[String], <<?[String], <<?[java.sql.Timestamp], <<?[java.sql.Timestamp], <<?[String], <<?[String], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal], <<?[scala.math.BigDecimal]))
}
/** Table description of table sales. Objects of this class serve as prototypes for rows in queries. */
class Sales(_tableTag: Tag) extends Table[Sale](_tableTag, "sales") {
def * = (itemUuid, itemName, sellerUuid, startDate, endDate, bestBidUuid, bestBidderUuid, initialPrice, bestOffer, charges) <> (Sale.tupled, Sale.unapply)
/** Database column item_uuid DBType(varchar), Length(36,true), Default(None) */
val itemUuid: Column[Option[String]] = column[Option[String]]("item_uuid", O.Length(36,varying=true), O.Default(None))
/** Database column item_name DBType(varchar), Length(20,true), Default(None) */
val itemName: Column[Option[String]] = column[Option[String]]("item_name", O.Length(20,varying=true), O.Default(None))
/** Database column seller_uuid DBType(varchar), Length(36,true), Default(None) */
val sellerUuid: Column[Option[String]] = column[Option[String]]("seller_uuid", O.Length(36,varying=true), O.Default(None))
/** Database column start_date DBType(timestamptz), Default(None) */
val startDate: Column[Option[java.sql.Timestamp]] = column[Option[java.sql.Timestamp]]("start_date", O.Default(None))
/** Database column end_date DBType(timestamptz), Default(None) */
val endDate: Column[Option[java.sql.Timestamp]] = column[Option[java.sql.Timestamp]]("end_date", O.Default(None))
/** Database column best_bid_uuid DBType(varchar), Length(36,true), Default(None) */
val bestBidUuid: Column[Option[String]] = column[Option[String]]("best_bid_uuid", O.Length(36,varying=true), O.Default(None))
/** Database column best_bidder_uuid DBType(varchar), Length(36,true), Default(None) */
val bestBidderUuid: Column[Option[String]] = column[Option[String]]("best_bidder_uuid", O.Length(36,varying=true), O.Default(None))
/** Database column initial_price DBType(numeric), Default(None) */
val initialPrice: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("initial_price", O.Default(None))
/** Database column best_offer DBType(numeric), Default(None) */
val bestOffer: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("best_offer", O.Default(None))
/** Database column charges DBType(numeric), Default(None) */
val charges: Column[Option[scala.math.BigDecimal]] = column[Option[scala.math.BigDecimal]]("charges", O.Default(None))
}
/** Collection-like TableQuery object for table Sales */
lazy val Sales = new TableQuery(tag => new Sales(tag))
}
|