<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */


class WebLoginProtocol extends Datamodul
{
  
  public $user_id = 0;
  
  public $modul = -1;
  
  public $vorgang = -1;
  
  public $zeitpunkt = '';
  
  public $login = '';


  public const LOGIN_PROT_MODUL_KUFERTOOLS = 0;
  public const LOGIN_PROT_MODUL_WEBADMIN = 2;

  public const LOGIN_PROT_VORGANG_LOGIN = 0;
  public const LOGIN_PROT_VORGANG_LOGOUT = 1;
  public const LOGIN_PROT_VORGANG_LOGIN_ERR = 2;

  public function getTyp($pFieldName)
  {
    switch ($pFieldName) {
      default:
        return parent::getTyp($pFieldName);
      case 'user_id':
      case 'modul':
      case 'vorgang':
        return \DatamodulVarType::TYPE_INT;
      case 'zeitpunkt':
        return \DatamodulVarType::TYPE_DATETIME;
    }
  }
}