<?php

namespace Resources\Termine;

require_once("resources/Termine/Diensplan.php");
require_once("resources/Termine/Kategorie.php");
require_once("resources/Termine/Platzvergabe.php");
require_once("resources/Struktur/Gruppe.php");
require_once("links/Termine_Teilnahmen.php");

class Termin extends \Resources\Handler
{
	protected $names = ["table" => "Termine", "ident" => "Termine", "short" => "t"];
	protected $has = ["uuid" => false, "sha256" => false];
	protected $definitions = [
		"fields" => [
			"Beginn" => ["default" => "0000-00-00 00:00:00", "type" => "s"],
			"Ende" => ["default" => "0000-00-00 00:00:00", "type" => "s"],
			"Thema" => ["default" => "", "type" => "s"],
			"Ort" => ["default" => "", "type" => "s"],
		],
		"keys" => [
			"Dienstplan" => ["resourceClass" => "Termine\\Dienstplan", "nullable" => true, "type" => "s"],
			"Kategorie" => ["resourceClass" => "Termine\\Kategorie", "nullable" => true, "type" => "s"],
			"Platzvergabe" => ["resourceClass" => "Termine\\Platzvergabe", "nullable" => true, "type" => "s"],
			"Gruppe" => ["resourceClass" => "Struktur\\Gruppe", "nullable" => true, "type" => "s"],
		],
		"links" => [
			"Teilnahmen" => ["linkClass" => "Termine_Teilnahmen"],
		]
	];
}