<?php

namespace Crm\Product\Seeders;

use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;

class ProductTableSeeder extends Seeder
{
    public function run()
    {
        DB::table('crm_product_products')->insert([
            
        ]);

        DB::table('permissions')->insert([
            [
                'slug'      => 'crm.product.product.view',
                'name'      => 'View Product',
            ],
            [
                'slug'      => 'crm.product.product.create',
                'name'      => 'Create Product',
            ],
            [
                'slug'      => 'crm.product.product.edit',
                'name'      => 'Update Product',
            ],
            [
                'slug'      => 'crm.product.product.delete',
                'name'      => 'Delete Product',
            ],
            
            
                    ]);

        DB::table('menus')->insert([
        
            // Admin menu
            [
                'parent_id'   => 1,
                'key'         => null,
                'url'         => 'admin/product/product',
                'name'        => 'Product',
                'description' => null,
                'icon'        => 'las la-scroll',
                'target'      => null,
                'order'       => 190,
                'status'      => 1,
            ],
            
            // User menu.
            [
                'parent_id'   => 2,
                'key'         => null,
                'url'         => 'user/product/product',
                'name'        => 'Product',
                'description' => null,
                'icon'        => 'las la-scroll',
                'target'      => null,
                'order'       => 190,
                'status'      => 1,
            ],

            // Public menu.
            [
                'parent_id'   => 3,
                'key'         => null,
                'url'         => 'product',
                'name'        => 'Product',
                'description' => null,
                'icon'        => 'las la-scroll,
                'target'      => null,
                'order'       => 190,
                'status'      => 1,
            ],

        ]);

        DB::table('settings')->insert([
            // Uncomment  and edit this section for entering value to settings table.
            /*
            [
                'pacakge'   => 'Product',
                'module'    => 'Product',
                'user_type' => null,
                'user_id'   => null,
                'key'       => 'crm.product.product.key',
                'name'      => 'Some name',
                'value'     => 'Some value',
                'type'      => 'Default',
                'control'   => 'text',
            ],
            */
        ]);
    }
}