<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;

class AdditionalPermissions extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        
        $perms = [
            //payment term
            [
                'name'  => 'can search payment term',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can list payment term',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can create payment term',
                'guard_name'    =>  'api'
            ],
            //fiscal year
            [
                'name'  => 'can search fiscal year',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can list fiscal year',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can create fiscal year',
                'guard_name'    =>  'api'
            ],
            //accounting dimension
            [
                'name'  => 'can search accounting dimension',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can list accounting dimension',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can create accounting dimension',
                'guard_name'    =>  'api'
            ],
            //company
            [
                'name'  => 'can search company',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can list company',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can create company',
                'guard_name'    =>  'api'
            ],
            //accounting period
            [
                'name'  => 'can search company accounting period',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can search accounting period',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can list accounting period',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can create accounting period',
                'guard_name'    =>  'api'
            ],
            //finance book
            [
                'name'  => 'can search finance book',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can list finance book',
                'guard_name'    =>  'api'
            ],
            [
                'name'  => 'can create finance book',
                'guard_name'    =>  'api'
            ],
            //notifications
            [
                'name'  => 'can see notification',
                'guard_name'    =>  'api'
            ],
            
        ];

        //create all additional permissions
        Permission::insert($perms);

    }
}
