<?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('oms_clients', function (Blueprint $table) {
            $table->id();
            $table->date('date');
            $table->string('client_name');
            $table->string('guardian_name');
            $table->text('address')->nullable();
            $table->string('nid_number');
            $table->string('mobile_number')->nullable();
            $table->string('product_name')->nullable();
            $table->foreignId('dealer_id')->constrained('oms_dealers')->onDelete('cascade');
            $table->string('word_no');
            $table->string('institute_name');
            $table->string('sale_point');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('oms_clients');
    }
};
