first commit

This commit is contained in:
Sampanna Rimal
2024-08-27 17:48:06 +05:45
commit 53c0140f58
10839 changed files with 1125847 additions and 0 deletions

View File

@ -0,0 +1,38 @@
<?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_leaves', function (Blueprint $table) {
$table->tinyInteger('leave_id')->unsigned()->autoIncrement();
$table->unsignedBigInteger('employee_id');
$table->unsignedBigInteger('leave_type_id');
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->date('leave_approved_date')->nullable();
$table->Integer('total_days')->nullable();
$table->unsignedBigInteger('leave_approved_by')->nullable();
$table->integer('duration')->nullable();
$table->integer('status')->default(11);
$table->longtext('description')->nullable();
$table->text('remarks')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_leaves');
}
};

View File

@ -0,0 +1,37 @@
<?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('name');
$table->integer('total_days');
$table->integer('max_accumulated_days')->nullable();
$table->boolean('is_accumulated')->default(false);
$table->boolean('is_proportionate')->default(false);
$table->integer('status')->default(11);
$table->mediumText('description')->nullable();
$table->mediumText('remarks')->nullable();
$table->integer('createdBy')->nullable();
$table->integer('updatedBy')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_leave_types');
}
};

View File

View File

@ -0,0 +1,16 @@
<?php
namespace Modules\Leave\database\seeders;
use Illuminate\Database\Seeder;
class LeaveDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// $this->call([]);
}
}