Initial setup work for making nominations under scobda rules.
This commit is contained in:
parent
8055de4778
commit
96a2add662
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class NominationEnsembleEntry extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use App\Models\NominationEnsemble;
|
||||
use App\Models\Student;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('nomination_ensemble_entries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(Student::class)->constrained()->cascadeOnUpdate()->restrictOnDelete();
|
||||
$table->foreignIdFor(NominationEnsemble::class)->constrained()->cascadeOnUpdate()->restrictOnDelete();
|
||||
$table->json('data');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('nomination_ensemble_entries');
|
||||
}
|
||||
};
|
||||
|
|
@ -12,3 +12,7 @@ Route::middleware(['auth', 'verified', CheckIfAdmin::class])->prefix('nomination
|
|||
Route::delete('/{ensemble}', 'destroy')->name('nomination.admin.ensemble.destroy');
|
||||
});
|
||||
});
|
||||
|
||||
Route::middleware(['auth', 'verified'])->prefix('nominations/')->group(function () {
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue