<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableClients extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('clnts', function (Blueprint $table) {
            $table->id();
            $table->string('branch', 5)->nullable();
            $table->double('c_id', 10)->unique()->nullable();
            $table->string('fl_no', 10)->nullable();
            $table->string('module', 50)->nullable();
            $table->boolean('category')->default(0);
            $table->string('sub_cat', 50)->nullable();
            $table->string('title', 50)->nullable();
            $table->string('nms', 50)->nullable();
            $table->string('gnd', 10)->nullable();
            $table->date('dob')->nullable();
            $table->string('pn', 30)->nullable();
            $table->string('alt_pn', 30)->nullable();
            $table->string('id_no', 15)->nullable();
            $table->string('pin', 20)->nullable();
            $table->string('em', 50)->nullable();
            $table->string('alt_em', 50)->nullable();
            $table->string('pob', 30)->nullable();
            $table->string('address', 50)->nullable();
            $table->string('occp', 50)->nullable();
            $table->boolean('is_prospect')->default(0);
            $table->boolean('status')->default(1);
            $table->boolean('confirmed')->default(0);
            $table->longText('confirmed_comments')->nullable();
            $table->string('confirmed_by',10)->nullable();
            $table->dateTime('confirmed_at')->nullable();
            $table->boolean('deleted')->default(0);
            $table->string('deleted_by', 10)->nullable();
            $table->softDeletes();
            $table->boolean('sales_type')->default(0)->nullable();
            $table->string('leeds', 10)->nullable();
            $table->string('introduced_by', 10)->nullable();
            $table->string('handled_by', 10)->nullable();
            $table->string('sub_agent', 10)->nullable();
            $table->string('scheme', 10)->nullable();
            $table->string('created_by', 10)->nullable();
            $table->string('stamp', 20)->nullable();
            $table->timestamps();
        });
    }

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