<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('tc');
            $table->string('name');
            $table->integer('gender')->default(0);
            $table->string('email')->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->string('blood_type');
            $table->string('telephone');
            $table->string('second_telephone')->nullable();
            $table->text('address');
            $table->string('city');
            $table->integer('application_management')->default(0);
            $table->integer('need_home_management')->default(0);
            $table->integer('has_home_management')->default(0);
            $table->integer('user_management')->default(0);
            $table->string('ehliyet')->nullable();
            $table->string('kimlik')->nullable();
            $table->string('ikametgah')->nullable();
            $table->string('sozlesme')->nullable();
            $table->integer('married')->default(0);
            $table->text('first_near_name')->nullable();
            $table->text('first_near_telephone')->nullable();
            $table->text('first_near_address')->nullable();
            $table->text('second_near_name')->nullable();
            $table->text('second_near_telephone')->nullable();
            $table->text('second_near_address')->nullable();
            $table->text('third_near_name')->nullable();
            $table->text('third_near_telephone')->nullable();
            $table->text('third_near_address')->nullable();
            $table->integer('status')->default(1);
            $table->rememberToken();
            $table->timestamps();
        });
    }

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