<?php

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

class CreateFormEicTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('form_eics', function (Blueprint $table) {
            $table->bigIncrements('id');

            $table->string('full_name_app', 150)->nullable();
            $table->string('email_app', 100)->nullable();
            $table->string('full_name_company', 150)->nullable();
            $table->string('postal_code', 20)->nullable();
            $table->string('city', 100)->nullable();
            $table->string('country', 100)->nullable();
            $table->string('eu_vat_code', 50)->nullable();
            $table->string('acer', 255)->nullable();
            $table->string('company_number', 50)->nullable();
            $table->string('contact_person', 150)->nullable();
            $table->string('contact_function', 100)->nullable();
            $table->string('contact_phone', 50)->nullable();
            $table->string('contact_email', 100)->nullable();

            $table->string('document_company_filename', 255)->nullable();
            $table->string('document_company_original_filename', 255)->nullable();
            $table->string('document_company_extension', 5)->nullable();

            $table->string('document_vat_filename', 255)->nullable();
            $table->string('document_vat_original_filename', 255)->nullable();
            $table->string('document_vat_extension', 5)->nullable();

            $table->boolean('agree_manual')->nullable();
            $table->boolean('agree_gdpr')->nullable();

            $table->nullableTimestamps();
        });
    }

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