<?php

namespace App\Reports\Sources\UsersProfilesAccess;

class ColumnsManager extends \App\Reports\Sources\ColumnsManagerAbstract
{

	/**
	 * The definition of report source columns.
	 * @var array
	 */
	protected array $columnsCfg = [
		'id'				=> ['type' => 'string', 	'dbDef' => "VARCHAR(160) NOT NULL", 								'cat' => "general", 'disabled' => true],
		'idProfile'			=> ['type' => 'numeric', 	'dbDef' => "SMALLINT(5) UNSIGNED NOT NULL", 						'cat' => "general"],
		'profileName'		=> ['type' => 'string', 	'dbDef' => "VARCHAR(100) NOT NULL DEFAULT ''", 						'cat' => "general"],
		'addTime'			=> ['type' => 'datetime', 	'dbDef'	=> "DATETIME NULL", 										'cat' => "general"],
		'idSection'			=> ['type' => 'string', 	'dbDef' => "VARCHAR(250) NOT NULL", 								'cat' => "general"],
		'sectionName'		=> ['type' => 'string', 	'dbDef' => "VARCHAR(500) NOT NULL DEFAULT ''", 						'cat' => "general"],
		'type'				=> ['type' => 'string', 	'dbDef' => "ENUM('section', 'option') NOT NULL DEFAULT 'section'",	'cat' => "general"],
		'optionValue'		=> ['type' => 'string', 	'dbDef' => "VARCHAR(3000) NOT NULL DEFAULT ''", 					'cat' => "general"],
	];

	/**
	 * The primary key column.
	 * @var string
	 */
	protected string $primaryKeyColumn = 'id';

	/**
	 * The columns that are forced into the report.
	 * @var array
	 */
	protected array $forcedColumns = [ ];

	/**
	 * The columns dependencies list.
	 * @var array
	 */
	protected array $columnsDependencies = [
		'sectionName' => ['idSection', 'type'],
	];


}