Preliminary work on nomination ensemble model and interface.

This commit is contained in:
Matt Young 2025-02-01 13:38:45 -06:00
parent a15cadc551
commit d52a3a7f71
3 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers\NominationEnsembles;
interface NominationEnsembleController
{
public function index();
public function show();
public function create();
public function store();
public function edit();
public function update();
public function destroy();
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class NominationEnsemble extends Model
{
use HasFactory;
protected function casts(): array
{
return [
'data' => 'array',
];
}
}

View File

@ -0,0 +1,32 @@
<?php
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_ensembles', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->date('entry_deadline');
$table->integer('minimum_grade');
$table->integer('maximum_grade');
$table->json('data')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('nomination_ensembles');
}
};