<?php

namespace Links;

require_once("resources/Fahrzeuge/Fahrzeug.php");
require_once("resources/Personal/Personal.php");

class Fahrzeuge_Einweisungen extends \Links\Link
{
	protected $names = ["table" => "Fahrzeuge_Einweisungen", "short" => "fe"];
	protected $definitions = [
		"left" => ["ident" => "Fahrzeuge", "resourceClass" => "Fahrzeuge\\Fahrzeug"],
		"right" => ["ident" => "Personal", "resourceClass" => "Personal\\Personal"],
		"fields" => [],
		"keys" => []
	];
	
	protected static $rights = null;
	
	public static function Rights() {
  	if (is_null(self::$rights)) {
  		self::$rights = \Rights\LinkRights::Make()
  		  ->Add(\Rights\Link::Make("DARF_PERSONAL_VERWALTEN")->Allow("admin"))
  		  ->Add(\Rights\Link::Make("DARF_FAHRZEUGEINWEISUNGEN_VERWALTEN")->Allow("admin"));
  	}
  	return self::$rights;
  }
}
