diff --git a/src/sql/tables/Auction.sql b/src/sql/tables/Auction.sql new file mode 100644 index 0000000..b0da252 --- /dev/null +++ b/src/sql/tables/Auction.sql @@ -0,0 +1,10 @@ +CREATE TABLE IF NOT EXISTS "Auction" ( + "id" INTEGER NOT NULL UNIQUE, + "user_id" INTEGER NOT NULL, + "title" TEXT NOT NULL, + "description" TEXT NOT NULL, + "init_price" INTEGER NOT NULL DEFAULT 1, + "start_time" DATE NOT NULL, + "end_time" DATE NOT NULL, + PRIMARY KEY("id" AUTOINCREMENT) +); diff --git a/src/sql/tables/Image.sql b/src/sql/tables/Image.sql new file mode 100644 index 0000000..fea64d9 --- /dev/null +++ b/src/sql/tables/Image.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS "Image" ( + "id" INTEGER NOT NULL UNIQUE, + "auction_id" INTEGER NOT NULL, + "image_order" INTEGER NOT NULL DEFAULT 0, + "url" TEXT NOT NULL, + PRIMARY KEY("id" AUTOINCREMENT) +);