<?php

namespace Mtc\Modules\B2B\Database\Seeders;

use Illuminate\Database\Seeder;
use Mtc\Modules\B2B\Models\TradeTier;

class B2BTradeTierSeeder extends Seeder
{
    public function run(): void
    {
        $tiers = [
            ['name' => 'Standard', 'discount_percentage' => 0.00],
            ['name' => 'Bronze', 'discount_percentage' => 5.00],
            ['name' => 'Silver', 'discount_percentage' => 7.50],
            ['name' => 'Gold', 'discount_percentage' => 10.00],
        ];

        foreach ($tiers as $tier) {
            TradeTier::firstOrCreate(
                ['name' => $tier['name']],
                $tier
            );
        }
    }
}
