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


class Gutschein extends Datamodul
{
  public $code;
  public $betrag;
  public $betrag_offen;
  public $web_offen;
  public $gueltig_von;
  public $gueltig_bis;
  public $bonus;
  public $gekauft_von;
  public $gekauft_am;
  public $name_empfaenger;
  public $zahlart;
  public $gesendet_am;
  public $beleg_id;
  public $nummer;
  public $geloescht;

  public function getTyp($pFieldName)
  {
    switch ($pFieldName) {
      default:
        return parent::getTyp($pFieldName);
      case 'gueltig_von':
      case 'gueltig_bis':
        return \DatamodulVarType::TYPE_DATE;
      case 'gekauft_am':
      case 'gesendet_am':
        return \DatamodulVarType::TYPE_DATETIME;
      case 'gekauft_von':
      case 'beleg_id':
        return \DatamodulVarType::TYPE_INT;
      case 'betrag':
      case 'betrag_offen':
      case 'web_offen':
        return \DatamodulVarType::TYPE_FLOAT;
    }
  }
}