<?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('companies', function (Blueprint $table) {
			$table->id();
			$table->timestamps();
			$table->softDeletes();
			$table->unsignedBigInteger('created_by')->nullable();
			$table->unsignedBigInteger('updated_by')->nullable();
			$table->unsignedBigInteger('deleted_by')->nullable();

			$table->string('name', 400)->nullable();
			$table->string('email', 255)->nullable();
			$table->string('cnpj', 14)->nullable();
			$table->string('phone', 15)->nullable();
			$table->string('opening_hours', 255)->nullable();
			$table->string('zip_code', 15)->nullable();
			$table->string('address', 400)->nullable();
			$table->string('number', 9)->nullable();
			$table->string('complement', 4000)->nullable();
			$table->string('neighborhood', 45)->nullable();
			$table->string('city', 45)->nullable();
			$table->string('uf', 8)->nullable();
			$table->string('facebook', 255)->nullable();
			$table->string('twitter', 255)->nullable();
			$table->string('instagram', 255)->nullable();
			$table->string('pinterest', 255)->nullable();
			$table->string('linkedin', 255)->nullable();
			$table->string('youtube', 255)->nullable();
		});
	}

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