Scobda nomination ensembles #106

Merged
okorpheus merged 25 commits from scobda_first_year into master 2025-02-12 21:51:10 +00:00
3 changed files with 70 additions and 0 deletions
Showing only changes of commit d52a3a7f71 - Show all commits

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');
}
};