<?php

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

return new class extends Migration
{
    public function up()
    {
        Schema::create('books', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('author');
            $table->string('co_author')->nullable();
            $table->string('published_no');
            $table->string('publisher');
            $table->string('ddc_no');
            $table->string('edition');
            $table->integer('publish_year');
            $table->enum('status', ['National', 'International']);
            $table->enum('authentication', ['Single', 'Multi']);
            $table->string('cover_image')->nullable();
            $table->timestamps();
        });
    }

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