<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */


class Ortverf extends Datamodul
{
  public $id;
  public $ortnr = 0;

  
  public $wochentag = 0;
  public $vondat = '';
  public $bisdat = '';
  public $vonuhr = '';
  public $bisuhr = '';
  public $verantwort = '';
  public $begruendung = '';
  public $bearbeiter = '';
  public $bearbdatum = '';

  
  public $kommentar = '';

  
  public $kollisionen = array();

  public function getTyp($pFieldName)
  {
    switch ($pFieldName) {
      default:
        return parent::getTyp($pFieldName);
      case 'von_dat':
      case 'bis_dat':
      case 'vondat':
      case 'bisdat':
      case 'bearbdatum':
        return \DatamodulVarType::TYPE_DATE;
      case 'vonuhr':
      case 'bisuhr':
      case 'von_uhr':
      case 'bis_uhr':
        return \DatamodulVarType::TYPE_TIME;
      case 'ortnr':
      case 'wochentag':
        return \DatamodulVarType::TYPE_INT;
    }
  }

  public function getDMZVarnameMappingForSendingData()
  {
    return array('vondat' => 'von_dat',
                 'bisdat' => 'bis_dat',
                 'vonuhr' => 'von_uhr',
                 'bisuhr' => 'bis_uhr',
                 'verantwort' => 'verantwortlicher');
  }
}