<?php

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

class CreatePartnerDataTable extends Migration
{
    public function up()
    {
        Schema::create('partner_data', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');                             // mandatory
            $table->string('company_type')->nullable();
            $table->string('sub_partner_id')->nullable();
            $table->string('ucic')->nullable();
            $table->string('tan')->nullable();
            $table->string('pan')->nullable();
            $table->string('gstn')->nullable();
            $table->string('city')->nullable();
            $table->string('state')->nullable();
            $table->string('zip', 20)->nullable();
            $table->string('mobile', 20)->nullable();
            $table->string('email')->nullable();
            $table->string('product')->nullable();
            $table->string('sub_product')->nullable();
            $table->string('source')->nullable();
            $table->text('gst_address')->nullable();
            $table->string('bank_account_holder_name')->nullable();
            $table->string('bank_account_number')->nullable();
            $table->string('bank_name')->nullable();
            $table->string('bank_identifier_code')->nullable();
            $table->string('website')->nullable();
            $table->string('tags')->nullable();
            $table->string('industry')->nullable();
            $table->string('salesperson')->nullable();
            $table->string('sales_team')->nullable();
            $table->string('customer_payment_terms')->nullable();
            $table->string('pricelist')->nullable();
            $table->string('barcode')->nullable();
            $table->string('fiscal_position')->nullable();
            $table->string('reference')->nullable();
            $table->string('company')->nullable();
            $table->string('format')->nullable();
            $table->integer('created_by')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    public function down()
    {
        Schema::dropIfExists('partner_data');
    }
}
