<?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('pets', function (Blueprint $table) {
            $table->integer('id')->primary();
            $table->string('name', 255);
            $table->integer('level')->default(1);
            $table->integer('evolution')->default(1);
            $table->integer('exp')->default(0);
            $table->integer('expi')->default(0);
            $table->integer('bonus0')->default(0);
            $table->integer('bonus1')->default(0);
            $table->integer('bonus2')->default(0);
            $table->integer('skill0')->default(-1);
            $table->integer('skill0lv')->default(0);
            $table->integer('skill1')->default(-1);
            $table->integer('skill1lv')->default(0);
            $table->integer('skill2')->default(-1);
            $table->integer('skill2lv')->default(0);
            $table->integer('item_duration')->default(0);
            $table->integer('born_duration')->nullable();
            $table->dateTime('birthday')->nullable();
            $table->integer('age')->nullable();
            $table->integer('age_bonus')->nullable()->default(0);
            $table->integer('pettype')->nullable()->default(0);
            $table->integer('typebonus0')->nullable()->default(0);
            $table->integer('typebonus1')->nullable()->default(0);
            $table->integer('typebonus2')->nullable()->default(0);
        });
    }

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