<?php

namespace Database\Seeders;

use App\Models\ProductManagement\Category;
use Illuminate\Database\Seeder;

class CategoriesTableSeeder extends Seeder{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run(){
        $clothes = Category::create(['name' => 'Clothes', 'active' => true]);
        Category::create(['name' => 'Women\' Clothes', 'active' => true, 'parent_id' => $clothes->id]);
        Category::create(['name' => 'Men\' Clothes', 'active' => true, 'parent_id' => $clothes->id]);
        Category::create(['name' => 'Boy\' Clothes', 'active' => true, 'parent_id' => $clothes->id]);
        Category::create(['name' => 'Girls\' Clothes', 'active' => true, 'parent_id' => $clothes->id]);


        $shoes = Category::create(['name' => 'Shoes', 'active' => true]);
        Category::create(['name' => 'Women\' Shoes', 'active' => true, 'parent_id' => $shoes->id]);
        Category::create(['name' => 'Men\' Shoes', 'active' => true, 'parent_id' => $shoes->id]);
        Category::create(['name' => 'Boy\' Shoes', 'active' => true, 'parent_id' => $shoes->id]);
        Category::create(['name' => 'Girls\' Shoes', 'active' => true, 'parent_id' => $shoes->id]);

        $watches = Category::create(['name' => 'Watches', 'active' => true]);
        Category::create(['name' => 'Women\' Watches', 'active' => true, 'parent_id' => $watches->id]);
        Category::create(['name' => 'Men\' Watches', 'active' => true, 'parent_id' => $watches->id]);
        Category::create(['name' => 'Boy\' Watches', 'active' => true, 'parent_id' => $watches->id]);
        Category::create(['name' => 'Girls\' Watches', 'active' => true, 'parent_id' => $watches->id]);

        $electronics = Category::create(['name' => 'Electronics', 'active' => true]);
        Category::create(['name' => 'USB Flash drives', 'active' => true, 'parent_id' => $electronics->id]);
        Category::create(['name' => 'Headphone', 'active' => true, 'parent_id' => $electronics->id]);
        Category::create(['name' => 'Portable speakers', 'active' => true, 'parent_id' => $electronics->id]);
        Category::create(['name' => 'Keyboards', 'active' => true, 'parent_id' => $electronics->id]);
    }
}
