- new role management section for corporations admins - added column "nullable" detection within /setup page for DB diff - added new map icon options options to the map add/edit dialog - refactored setup() method for all tables with static data - fixed broken map icons - fixed broken "drag/select" for systems on map - fixed new "map resize" event for non Chrome browsers - multiple minor improvements and fixes...
82 lines
1.8 KiB
PHP
82 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: exodu
|
|
* Date: 28.01.2018
|
|
* Time: 14:38
|
|
*/
|
|
|
|
namespace Model;
|
|
|
|
use DB\SQL\Schema;
|
|
|
|
class RightModel extends BasicModel {
|
|
|
|
protected $table = 'right';
|
|
|
|
protected $fieldConf = [
|
|
'active' => [
|
|
'type' => Schema::DT_BOOL,
|
|
'nullable' => false,
|
|
'default' => 1,
|
|
'index' => true
|
|
],
|
|
'name' => [
|
|
'type' => Schema::DT_VARCHAR128,
|
|
'nullable' => false,
|
|
'default' => ''
|
|
],
|
|
'label' => [
|
|
'type' => Schema::DT_VARCHAR128,
|
|
'nullable' => false,
|
|
'default' => ''
|
|
],
|
|
'description' => [
|
|
'type' => Schema::DT_VARCHAR512,
|
|
'nullable' => false,
|
|
'default' => ''
|
|
],
|
|
'corporationRights' => [
|
|
'has-many' => ['Model\CorporationRightModel', 'rightId']
|
|
]
|
|
];
|
|
|
|
protected static $tableData = [
|
|
[
|
|
'id' => 1,
|
|
'name' => 'map_update',
|
|
'label' => 'update',
|
|
'description' => 'Map settings update right'
|
|
],
|
|
[
|
|
'id' => 2,
|
|
'name' => 'map_delete',
|
|
'label' => 'delete',
|
|
'description' => 'Map delete right'
|
|
],
|
|
[
|
|
'id' => 3,
|
|
'name' => 'map_import',
|
|
'label' => 'import',
|
|
'description' => 'Map import right'
|
|
],
|
|
[
|
|
'id' => 4,
|
|
'name' => 'map_export',
|
|
'label' => 'export',
|
|
'description' => 'Map export right'
|
|
]
|
|
];
|
|
|
|
/**
|
|
* get right data
|
|
* @return \stdClass
|
|
*/
|
|
public function getData(){
|
|
$rightData = (object) [];
|
|
|
|
$rightData->name = $this->name;
|
|
|
|
return $rightData;
|
|
}
|
|
} |