<?php

namespace Database\Seeders;

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

class ModulePermissionTableSeeder extends Seeder
{
	/**
	 * Run the database seeds.
	 *
	 * @return void
	 */
	public function run()
	{
		DB::statement('SET FOREIGN_KEY_CHECKS=0;');
		DB::table('module_permissions')->truncate();

		DB::statement("INSERT INTO module_permissions (id, module_id, permission, alias, description) VALUES
			(1, '1', 'Can create', 'User.Create', 'This will allow you to create new user or save data'),
			(2, '1', 'Can update', 'User.Update', 'This will allow you to update user data.'),
			(3, '1', 'Can delete', 'User.Delete', 'This will allow you to remove user to the system'),
			(4, '1', 'Can view', 'User.View', 'This will allow you view user data.'),
			(5, '1', 'Can list', 'User.List', 'This will list all users in the system'),
            (6, '2', 'Can create', 'Role.Create', 'This will allow you to create new role or save data'),
			(7, '2', 'Can update', 'Role.Update', 'This will allow you to update role data.'),
			(8, '2', 'Can delete', 'Role.Delete', 'This will allow you to remove role to the system'),
			(9, '2', 'Can view', 'Role.View', 'This will allow you view role data.'),
			(10, '2', 'Can list', 'Role.List', 'This will list all roles in the system'),
            (11, '3', 'Can set permission', 'Permission.Set', 'This will allow you to set permissions of role'),
			(12, '3', 'Can update', 'Permission.Update', 'This will allow you to update permissions of role'),
			(13, '3', 'Can view', 'Permission.View', 'This will allow you to view all permissions'),
			(14, '3', 'Can list', 'Permission.List', 'This will allow you to list all permissions on the system'),
            (15, '4', 'Can create', 'Profession.Create', 'This will allow you to create new profession or save data'),
			(16, '4', 'Can update', 'Profession.Update', 'This will allow you to update profession data.'),
			(17, '4', 'Can delete', 'Profession.Delete', 'This will allow you to remove profession to the system'),
			(18, '4', 'Can view', 'Profession.View', 'This will allow you view profession data.'),
			(19, '4', 'Can list', 'Profession.List', 'This will list all professions in the system'),
			(20, '5', 'Can create', 'Tagline.Create', 'This will allow you to create a tagline in the system'),
			(21, '5', 'Can list', 'Tagline.List', 'This will allow you to list all taglines in the system'),
			(22, '5', 'Can update', 'Tagline.Update', 'This will allow you to update a tagline in the system'),
			(23, '5', 'Can delete', 'Tagline.Delete', 'This will allow you to delete a tagline in the system'),
			(24, '5', 'Can view', 'Tagline.View', 'This will allow you to view a tagline in the system'),
			(25, '6', 'Can list', 'Professional.List', 'This will allow you to list professionals in the system'),
			(26, '6', 'Can review', 'Professional.Review', 'This will allow you to review a professional in the system'),
			(27, '6', 'Can view', 'Professional.View', 'This will allow you to view a professional in the system'),
			(28, '7', 'Can list', 'Disbursement.List', 'This will allow you to list a disbursement in the system'),
			(29, '8', 'Can view', 'ConfigFee.View', 'This will allow you to view the standard fees'),
			(30, '8', 'Can update', 'ConfigFee.Update', 'This will allow you to update the standard fees')
		");

		DB::statement('SET FOREIGN_KEY_CHECKS=1;');
	}
}
