<?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('pasien', function (Blueprint $table) {
            $table->id();
            $table->string('norm', 150)->nullable();
            $table->string('nama', 150)->nullable();
            $table->string('jk', 1)->nullable();
            $table->date('tgl_lahir')->nullable();
            $table->string('kota', 50)->nullable();
            $table->text('alamat')->nullable();
            $table->string('telpon', 50)->nullable();
            $table->string('nik', 50)->nullable();
            $table->string('bpjs', 50)->nullable();
            $table->text('keterangan')->nullable();
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->useCurrent();
        });
    }

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