leave type module setup

This commit is contained in:
2024-04-11 17:55:56 +05:45
parent 7e345ef4e3
commit d80b1aa0e9
24 changed files with 437 additions and 26 deletions

View File

@ -11,11 +11,12 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('leaves', function (Blueprint $table) {
Schema::create('tbl_leaves', function (Blueprint $table) {
$table->tinyInteger('leave_id')->unsigned()->autoIncrement();
$table->integer('employee_id');
$table->date('start_date');
$table->date('end_date');
$table->unsignedBigInteger('employee_id');
$table->unsignedBigInteger('leave_type_id');
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->timestamps();
});
}
@ -25,6 +26,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('leaves');
Schema::dropIfExists('tbl_leaves');
}
};

View File

@ -0,0 +1,31 @@
<?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('tbl_leave_types', function (Blueprint $table) {
$table->tinyInteger('leave_type_id')->unsigned()->autoIncrement();
$table->string('title');
$table->integer('status')->default(11);
$table->integer('createdBy')->nullable();
$table->integer('updatedBy')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_leave_types');
}
};