34 lines
931 B
PHP
34 lines
931 B
PHP
<?php
|
|
|
|
namespace Resources\Fahrzeuge;
|
|
|
|
require_once("links/Fahrzeuge_Einweisungen.php");
|
|
|
|
class Fahrzeug extends \Resources\Handler
|
|
{
|
|
protected $names = ["table" => "Fahrzeuge", "ident" => "Fahrzeuge", "short" => "f"];
|
|
protected $has = ["uuid" => true, "sha256" => false];
|
|
protected $definitions = [
|
|
"fields" => [
|
|
"Kürzel" => ["default" => "", "type" => "s"],
|
|
"Name" => ["default" => "", "type" => "s"],
|
|
//"Bild" => ["default" => "", "type" => "s"],
|
|
],
|
|
"keys" => [
|
|
],
|
|
"links" => [
|
|
"Einweisungen" => ["linkClass" => "Fahrzeuge_Einweisungen"],
|
|
]
|
|
];
|
|
|
|
protected static $rights = null;
|
|
|
|
public static function Rights() {
|
|
if (is_null(self::$rights)) {
|
|
self::$rights = \Rights\MainRights::Make()
|
|
->Add(\Rights\Main::Make()->Allow("readonly")) // Jeder darf alle Fahrzeuge SEHEN
|
|
->Add(\Rights\Main::Make("DARF_FAHRZEUGE_VERWALTEN")->Allow("admin"));
|
|
}
|
|
return self::$rights;
|
|
}
|
|
} |