<?php

use App\Models\SettingManagement\Image;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        Schema::create((new Image)->getTable(), function (Blueprint $table) {
            $table->id();
            $table->string('file_name');
            $table->string('file_type');
            $table->string('file_size');
            $table->boolean('file_status')->default(false);
            $table->integer('file_sort')->default(0);
            $table->integer('mediable_id')->unsigned();
            $table->string('mediable_type');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::dropIfExists((new Image)->getTable());
    }
};
