From 48cc98d8a0ae9a70b2729ee047ce338edc652082 Mon Sep 17 00:00:00 2001 From: neerholt Date: Wed, 3 Mar 2021 11:41:09 +0100 Subject: [PATCH] Made models --- Backend/Database/GameData.php | 2 +- Backend/Database/GameJam.php | 2 +- Backend/Database/Group.php | 1 - Backend/Database/KeyWord.php | 2 +- Backend/Database/Password.php | 2 +- Backend/Database/databaseMigration.php | 10 +++++----- Backend/Database/hasVoted.php | 2 +- Backend/Models/GameJam.php | 7 +++++++ composer.json | 5 +++++ 9 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 Backend/Models/GameJam.php diff --git a/Backend/Database/GameData.php b/Backend/Database/GameData.php index fca466f..39ee50b 100644 --- a/Backend/Database/GameData.php +++ b/Backend/Database/GameData.php @@ -4,7 +4,7 @@ use Illuminate\Database\Capsule\Manager as Capsule; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -Capsule::schema()->create("Group", function (Blueprint $table){ +Capsule::schema()->create("GameData", function (Blueprint $table){ $table->id(); $table->string("gameLink"); $table->boolean("isWebBased"); diff --git a/Backend/Database/GameJam.php b/Backend/Database/GameJam.php index bb1a012..643e449 100644 --- a/Backend/Database/GameJam.php +++ b/Backend/Database/GameJam.php @@ -4,7 +4,7 @@ use Illuminate\Database\Capsule\Manager as Capsule; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -Capsule::schema()->create("Group", function (Blueprint $table){ +Capsule::schema()->create("GameJam", function (Blueprint $table){ $table->id(); $table->string("name"); $table->dateTime("startTime"); diff --git a/Backend/Database/Group.php b/Backend/Database/Group.php index 5325a31..4fac85d 100644 --- a/Backend/Database/Group.php +++ b/Backend/Database/Group.php @@ -12,5 +12,4 @@ Capsule::schema()->create("Group", function (Blueprint $table){ $table->integer("votes")->nullable(); $table->foreignId("fkPassword")->constrained("Password"); $table->foreignId("fkGameData")->nullable()->constrained("GameData"); - $table->timestamp(); }); \ No newline at end of file diff --git a/Backend/Database/KeyWord.php b/Backend/Database/KeyWord.php index 6dd2032..20af962 100644 --- a/Backend/Database/KeyWord.php +++ b/Backend/Database/KeyWord.php @@ -4,7 +4,7 @@ use Illuminate\Database\Capsule\Manager as Capsule; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -Capsule::schema()->create("Group", function (Blueprint $table){ +Capsule::schema()->create("KeyWord", function (Blueprint $table){ $table->id(); $table->string('keyWord'); $table->foreignId("fkGroup")->constrained("Group"); diff --git a/Backend/Database/Password.php b/Backend/Database/Password.php index 9d7912d..8d726bb 100644 --- a/Backend/Database/Password.php +++ b/Backend/Database/Password.php @@ -4,7 +4,7 @@ use Illuminate\Database\Capsule\Manager as Capsule; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -Capsule::schema()->create("Group", function (Blueprint $table){ +Capsule::schema()->create("Password", function (Blueprint $table){ $table->id(); $table->string('password'); $table->rememberToken(); diff --git a/Backend/Database/databaseMigration.php b/Backend/Database/databaseMigration.php index 85aa7b1..db21355 100644 --- a/Backend/Database/databaseMigration.php +++ b/Backend/Database/databaseMigration.php @@ -1,7 +1,7 @@ create("Group", function (Blueprint $table){ +Capsule::schema()->create("hasVoted", function (Blueprint $table){ $table->id(); }); \ No newline at end of file diff --git a/Backend/Models/GameJam.php b/Backend/Models/GameJam.php new file mode 100644 index 0000000..183b9bb --- /dev/null +++ b/Backend/Models/GameJam.php @@ -0,0 +1,7 @@ +