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


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


  const LOGIN_PROT_MODUL_KUFERTOOLS = 0;
  const LOGIN_PROT_MODUL_WEBADMIN = 2;

  const LOGIN_PROT_VORGANG_LOGIN = 0;
  const LOGIN_PROT_VORGANG_LOGOUT = 1;
  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;
    }
  }
}