<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\SongCategory;

class SongCategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $categories = [
            ['code' => 'A1', 'name' => '情歌'],
            ['code' => 'B1', 'name' => '選秀'],
            ['code' => 'C1', 'name' => '串燒'],
            ['code' => 'D1', 'name' => '90年'],
            ['code' => 'E1', 'name' => '懷念'],
            ['code' => 'F1', 'name' => '大陸'],
        ];

        foreach ($categories as $category) {
            SongCategory::create([
                'code' => $category['code'],
                'name' => $category['name'],
            ]);
        }
    }
}
