<?php

namespace IZON\Admin\Domain;

use \IZON\DB\DBObject;

/**
 * User role in administration
 */
class AdminRole implements DBObject {
    
    /**
     * nazev tabulky na kterou se mapuje
     */
    public static function __tableName() { return 'core_admin_roles'; }
    
    /**
     * @var integer 
     */
    protected $id;

    /**
     * @var string
     */
    protected $name;

    /**
     * @var string
     */
    protected $description;

    /**
     * @var AdminModule[] 
     */
    protected $modules = [];
    public static function __modules() { return \IZON\DB\transientField(); }
    
    
/// generated getters and setters    
    function getId() {
        return $this->id;
    }

    function getName() {
        return $this->name;
    }

    function getDescription() {
        return $this->description;
    }

    function setId($id) {
        $this->id = $id;
    }

    function setName($name) {
        $this->name = $name;
    }

    function setDescription($description) {
        $this->description = $description;
    }
    
    function getModules() {
        return $this->modules;
    }

    function setModules(array $modules) {
        $this->modules = $modules;
    }
}
