Auctions schema and creation

This commit is contained in:
2026-08-25 23:38:29 +03:00
parent 8582a92d85
commit 81e126013b
6 changed files with 126 additions and 5 deletions
+17
View File
@@ -0,0 +1,17 @@
-- !Ups
CREATE TABLE auctions
(
id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name VARCHAR NOT NULL,
gid VARCHAR UNIQUE NOT NULL,
author_id BIGINT REFERENCES users (id) NOT NULL,
starting_price DECIMAL(20, 3) NOT NULL,
current_bid DECIMAL(20, 3),
current_bidder_id BIGINT REFERENCES users (id),
current_bid_at TIMESTAMP,
created_at TIMESTAMP NOT NULL
);
-- !Downs
DROP TABLE auctions
+3
View File
@@ -13,3 +13,6 @@ DELETE /logout controllers.authentication.SessionsControlle
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
+nocsrf
POST /auctions controllers.AuctionsController.create()