<?php

declare(strict_types=1);

namespace Builder\Core\Providers;

use Builder\Core\Foundation\Enums\PublicationStatus;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\ServiceProvider;

final class MacroServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Blueprint::macro('publishingColumns', function (): void {
            /** @var Blueprint $this */
            $this->string('status')->default(PublicationStatus::Draft->value);
            $this->timestamp('publish_at')->nullable();
        });
    }
}
