<?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()
    {
        Schema::create('bukus', function (Blueprint $table) {
            $table->id();
            $table->string('bibid')->nullable();
            $table->string('judul');
            $table->string('edisi')->nullable();
            $table->string('pengarang');
            $table->string('penerbit');
            $table->year('tahun_terbit')->nullable();
            $table->text('deskripsi_fisik')->nullable();
            $table->string('nomor_panggil')->nullable();
            $table->string('konten_digital')->nullable();
            $table->integer('eksemplar')->default(1);
            $table->unsignedBigInteger('id_kategori')->nullable();
            $table->string('cover')->nullable();
            $table->float('lokasi_x')->nullable();
            $table->float('lokasi_y')->nullable();
            $table->timestamps();
        });
    }


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