<?php

declare(strict_types=1);

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Schema;
use Plugins\Larablog\Membership\Database\Seeders\MembershipPlanSeeder as PluginMembershipPlanSeeder;

class MembershipPlanSeeder extends Seeder
{
    public function run(): void
    {
        if (! Schema::hasTable('membership_plans')) {
            $this->command?->warn('membership_plans missing; run migrations first.');

            return;
        }

        $this->call(PluginMembershipPlanSeeder::class);
    }
}
