diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/Sale.scala | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/controllers/Sale.scala b/app/controllers/Sale.scala new file mode 100644 index 0000000..b5e4622 --- /dev/null +++ b/app/controllers/Sale.scala | |||
@@ -0,0 +1,37 @@ | |||
1 | package controllers | ||
2 | |||
3 | import play.api._ | ||
4 | import play.api.data._ | ||
5 | import play.api.data.Forms._ | ||
6 | import play.api.mvc._ | ||
7 | |||
8 | import play.api.db.slick._ | ||
9 | import play.api.db.slick.Config.driver.simple._ | ||
10 | import play.api.Play.current | ||
11 | |||
12 | import scala.concurrent.Future | ||
13 | |||
14 | import models._ | ||
15 | |||
16 | |||
17 | object Sale extends Controller { | ||
18 | |||
19 | def sales = Auth { implicit request => | ||
20 | DB.withSession { implicit session => | ||
21 | val currentDateTime = new java.sql.Timestamp((new java.util.Date).getTime) | ||
22 | val sales = Views.Sales.filter(_.endDate > currentDateTime).sortBy(_.endDate.asc).run | ||
23 | |||
24 | Ok(views.html.pages.sales.currentSales(sales)) | ||
25 | } | ||
26 | } | ||
27 | |||
28 | def sell(itemUuid: String) = TODO | ||
29 | |||
30 | |||
31 | def item(itemUuid: String) = TODO | ||
32 | |||
33 | def bids(itemUuid: String) = TODO | ||
34 | |||
35 | def bidSubmit(itemUuid: String) = TODO | ||
36 | |||
37 | } | ||