36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?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('awards', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('employee_id')->constrained('users')->onDelete('cascade');
|
|
$table->foreignId('award_type_id')->constrained('award_types')->onDelete('cascade');
|
|
$table->date('award_date');
|
|
$table->string('gift')->nullable();
|
|
$table->decimal('monetary_value', 15, 2)->nullable();
|
|
$table->text('description')->nullable();
|
|
$table->string('certificate')->nullable();
|
|
$table->string('photo')->nullable();
|
|
$table->foreignId('created_by')->constrained('users')->onDelete('cascade');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('awards');
|
|
}
|
|
}; |