<?php

namespace Bixo\App\Seeders;

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

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

        DB::table('permissions')->insert([
            [
                'slug'      => 'bixo.app.app.view',
                'name'      => 'View App',
            ],
            [
                'slug'      => 'bixo.app.app.create',
                'name'      => 'Create App',
            ],
            [
                'slug'      => 'bixo.app.app.edit',
                'name'      => 'Update App',
            ],
            [
                'slug'      => 'bixo.app.app.delete',
                'name'      => 'Delete App',
            ],
            
                        [
                'slug'      => 'bixo.app.app.verify',
                'name'      => 'Verify App',
            ],
            [
                'slug'      => 'bixo.app.app.approve',
                'name'      => 'Approve App',
            ],
            [
                'slug'      => 'bixo.app.app.publish',
                'name'      => 'Publish App',
            ],
            [
                'slug'      => 'bixo.app.app.unpublish',
                'name'      => 'Unpublish App',
            ],
            [
                'slug'      => 'bixo.app.app.cancel',
                'name'      => 'Cancel App',
            ],
            [
                'slug'      => 'bixo.app.app.archive',
                'name'      => 'Archive App',
            ],
            
                    ]);

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

            // Public menu.
            [
                'parent_id'   => 3,
                'key'         => null,
                'url'         => 'app',
                'name'        => 'App',
                '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'   => 'App',
                'module'    => 'App',
                'user_type' => null,
                'user_id'   => null,
                'key'       => 'bixo.app.app.key',
                'name'      => 'Some name',
                'value'     => 'Some value',
                'type'      => 'Default',
                'control'   => 'text',
            ],
            */
        ]);
    }
}