From f0f8038e8a5e368a36e50ae3bfd3986c179f3d96 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Wed, 11 Jun 2025 23:32:16 -0500 Subject: [PATCH] Create entry total score model and table. --- app/Models/EntryTotalScore.php | 11 +++++++ ...042434_create_entry_total_scores_table.php | 32 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 app/Models/EntryTotalScore.php create mode 100644 database/migrations/2025_06_12_042434_create_entry_total_scores_table.php diff --git a/app/Models/EntryTotalScore.php b/app/Models/EntryTotalScore.php new file mode 100644 index 0000000..2a5c598 --- /dev/null +++ b/app/Models/EntryTotalScore.php @@ -0,0 +1,11 @@ +id(); + $table->foreignIdFor(Entry::class)->constrained()->cascadeOnDelete()->cascadeOnUpdate(); + $table->decimal('seating_total', 9, 6); + $table->decimal('advancement_total', 9, 6); + $table->json('subscore_totals'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('entry_total_scores'); + } +};