<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('buku', function (Blueprint $table) {
            $table->increments('id_buku');
            $table->string('bibid')->nullable();
            $table->string('judul')->nullable();
            $table->string('edisi')->nullable();
            $table->string('penerbit')->nullable();
            $table->string('tahun_terbit')->nullable();
            $table->string('deskripsi_fisik')->nullable();
            $table->string('cover')->nullable();
            $table->double('lokasi_x')->nullable();
            $table->double('lokasi_y')->nullable();
            $table->string('pengarang')->nullable();
            $table->string('nomor_panggil')->nullable();
            $table->integer('konten_digital')->nullable();
            $table->integer('eksemplar')->nullable();
            $table->unsignedBigInteger('id_kategori')->nullable();
            $table->timestamp('created_at')->nullable();
            $table->timestamp('updated_at')->nullable();
        });
    }

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