<?php

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

class CreateDaSystemDataTable extends Migration
{
    public function up()
    {
        Schema::create('da_system_data', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('company_id', 50)->nullable();
            $table->string('cust_id', 50)->nullable();
            $table->string('loan_no', 100)->nullable();
            $table->string('pool', 100)->nullable();
            $table->string('member_name', 40)->nullable();
            $table->string('date_of_birth', 50)->nullable();
            $table->string('age', 20)->nullable();
            $table->string('mobile_number', 20)->nullable();
            $table->string('nominee_name', 30)->nullable();
            $table->string('nominee_dob', 50)->nullable();
            $table->string('nominee_age', 20)->nullable();
            $table->string('nominee_relation', 100)->nullable();
            $table->string('spouse_name', 30)->nullable();
            $table->string('father_name', 30)->nullable();
            $table->string('caste', 20)->nullable();
            $table->string('religion', 15)->nullable();
            $table->string('disbursement_date', 50)->nullable();
            $table->string('rural_urban', 20)->nullable();
            $table->string('purpose_id', 100)->nullable();
            $table->string('sub_purpose', 200)->nullable();
            $table->string('status', 7)->nullable();
            $table->text('closure_remark')->nullable();
            $table->string('aadhaar_id', 20)->nullable();
            $table->string('loan_created_on', 50)->nullable();
            $table->text('address')->nullable();
            $table->string('village_name', 30)->nullable();
            $table->string('district', 30)->nullable();
            $table->string('state', 20)->nullable();
            $table->string('pincode', 20)->nullable();
            $table->string('funder_id', 100)->nullable();
            $table->string('fund_allocation_date', 50)->nullable();
            $table->string('lender_id', 10)->nullable();
            $table->string('branch_name', 40)->nullable();
            $table->string('branch_state', 40)->nullable();
            $table->string('region', 50)->nullable();
            $table->string('lo_name', 50)->nullable();
            $table->string('bank_account', 50)->nullable();
            $table->string('bank_ifsc_code', 20)->nullable();
            $table->string('disburse_by_fo', 30)->nullable();
            $table->string('empcode', 50)->nullable();
            $table->string('principal_arrear', 50)->nullable();
            $table->string('interest_arrear', 50)->nullable();
            $table->string('total_arrear', 50)->nullable();
            $table->string('prin_collected', 50)->nullable();
            $table->string('int_collected', 50)->nullable();
            $table->string('first_due_amount', 50)->nullable();
            $table->string('first_demand_date', 50)->nullable();
            $table->string('is_qualify', 20)->nullable();
            $table->string('last_maturity_date', 50)->nullable();
            $table->string('remaining_maturity', 50)->nullable();
            $table->string('last_coll_date', 50)->nullable();
            $table->string('last_coll_amount', 50)->nullable();
            $table->string('od_days', 20)->nullable();
            $table->string('od_bucket', 50)->nullable();
            $table->string('product_category_id', 50)->nullable();
            $table->string('product_id', 50)->nullable();
            $table->string('principal_total', 50)->nullable();
            $table->string('int_rate', 20)->nullable();
            $table->string('processing_fee', 50)->nullable();
            $table->string('tenure', 20)->nullable();
            $table->string('total_interest', 50)->nullable();
            $table->string('total_instal', 50)->nullable();
            $table->string('instal_os', 50)->nullable();
            $table->string('insurance_id', 50)->nullable();
            $table->string('fo_id', 50)->nullable();
            $table->string('payment_ref_number', 100)->nullable();
            $table->string('cycle', 20)->nullable();
            $table->string('repayment_frequency', 50)->nullable();
            $table->string('next_demand_date', 50)->nullable();
            $table->string('loan_closure_date', 50)->nullable();
            $table->string('insurance_charges', 50)->nullable();
            $table->string('prod_classification', 100)->nullable();
            $table->string('repayment_mode', 40)->nullable();
            $table->string('repayment_bank', 50)->nullable();
            $table->string('insurance_maturity_date', 50)->nullable();
            $table->string('outstanding_principal', 50)->nullable();
            $table->string('outstanding_interest', 50)->nullable();
            $table->string('netoff_amount', 50)->nullable();
            $table->string('document_charges', 50)->nullable();
            $table->string('stampduty_charges', 50)->nullable();
            $table->string('legal_fee', 50)->nullable();
            $table->string('application_fee', 50)->nullable();
            $table->string('pre_emi_amt', 50)->nullable();
            $table->string('fee_pay_mode', 100)->nullable();
            $table->string('npa_date', 50)->nullable();
            $table->string('excess_amount', 50)->nullable();
            $table->string('waiveoff_amount', 50)->nullable();
            $table->string('od_interest_collected_till_date', 50)->nullable();
            $table->string('loan_charges', 50)->nullable();
            $table->string('write_off_amount', 50)->nullable();
            $table->string('city', 100)->nullable();
            $table->string('customer_type', 100)->nullable();
            $table->string('w_off_settlement', 100)->nullable();
            $table->string('disbursement_amount', 50)->nullable();
            $table->string('disb_bank_name', 200)->nullable();
            $table->string('advance_emi', 50)->nullable();
            $table->string('mode_of_repayment', 100)->nullable();
            $table->string('inst_amt_rs', 50)->nullable();
            $table->string('over_due_inst', 50)->nullable();
            $table->string('over_due_amount_rs', 50)->nullable();
            $table->string('foir_percent', 20)->nullable();
            $table->string('credit_score', 20)->nullable();
            $table->string('aadhar_number', 20)->nullable();
            $table->string('pan_card_number', 20)->nullable();
            $table->string('peak_dpd', 20)->nullable();
            $table->string('dpd_string', 200)->nullable();
            $table->string('monthly_income', 50)->nullable();
            $table->string('business_vintage', 50)->nullable();
            $table->string('residence_vintage', 50)->nullable();
            $table->string('business_premises', 200)->nullable();
            $table->string('co_borrower_name', 200)->nullable();
            $table->string('co_borrower_contact_no', 20)->nullable();
            $table->string('gender', 20)->nullable();
            $table->string('uploaded_file')->nullable();
            $table->integer('created_by')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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