staff update
This commit is contained in:
50
database/migrations/2025_12_04_071300_create_staff_table.php
Normal file
50
database/migrations/2025_12_04_071300_create_staff_table.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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()
|
||||
{
|
||||
Schema::create('staff', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
// Personal Information
|
||||
$table->string('employee_id')->unique();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('phone');
|
||||
$table->string('emergency_phone')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
|
||||
// Professional Information
|
||||
$table->string('role')->nullable(); // Job title
|
||||
$table->string('department')->nullable();
|
||||
$table->string('designation')->nullable();
|
||||
$table->date('joining_date')->nullable();
|
||||
$table->string('status')->default('active'); // active/inactive
|
||||
$table->text('additional_info')->nullable();
|
||||
|
||||
// System Access
|
||||
$table->string('username')->unique();
|
||||
$table->string('password');
|
||||
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('staff');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user