40 lines
1.1 KiB
PHP
40 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()
|
||
|
|
{
|
||
|
|
Schema::create('requests', function (Blueprint $table) {
|
||
|
|
$table->id(); // Auto-increment primary key
|
||
|
|
$table->string('request_id')->unique(); // Custom formatted ID like REQ-2025-000001
|
||
|
|
$table->string('customer_name');
|
||
|
|
$table->string('company_name');
|
||
|
|
$table->string('designation');
|
||
|
|
$table->string('email')->unique();
|
||
|
|
$table->string('mobile_no');
|
||
|
|
$table->string('priority')->nullable();
|
||
|
|
$table->text('address')->nullable();
|
||
|
|
$table->string('pincode')->nullable();
|
||
|
|
$table->date('date')->nullable();
|
||
|
|
$table->enum('status', ['pending', 'approved', 'rejected'])->default('pending');
|
||
|
|
$table->timestamps();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Reverse the migrations.
|
||
|
|
*/
|
||
|
|
public function down(): void
|
||
|
|
{
|
||
|
|
Schema::dropIfExists('requests');
|
||
|
|
}
|
||
|
|
};
|