request Model is added

This commit is contained in:
Abhishek Mali
2025-11-07 12:08:34 +05:30
parent 3c4727acd9
commit 5b764c7597
15 changed files with 466 additions and 141 deletions

View File

@@ -11,22 +11,38 @@ return new class extends Migration
*/
public function up(): void
{
// USERS TABLE
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->id(); // Auto-increment primary key
// Custom customer ID like CID-2025-000001
$table->string('customer_id')->unique();
// Customer details
$table->string('customer_name');
$table->string('company_name');
$table->string('designation')->nullable();
$table->string('email')->unique();
$table->string('mobile_no');
$table->string('address')->nullable();
$table->string('pincode')->nullable();
$table->date('date')->nullable();
// Authentication fields
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('password')->nullable();
$table->rememberToken();
$table->timestamps();
});
// PASSWORD RESETS TABLE
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
// SESSIONS TABLE
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
@@ -42,8 +58,8 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('users');
}
};

View File

@@ -0,0 +1,45 @@
<?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('mark_lists', function (Blueprint $table) {
$table->id();
// Order as requested:
$table->string('mark_no');
$table->string('origin');
$table->string('destination');
$table->string('customer_name');
$table->string('mobile_no');
$table->unsignedBigInteger('customer_id');
$table->date('date')->nullable();
$table->enum('status', ['active', 'inactive'])->default('active');
$table->timestamps();
// Foreign key constraint
$table->foreign('customer_id')
->references('id')
->on('users')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mark_lists');
}
};