model classes for contract parts (Vertragsbestandteile)

This commit is contained in:
Werner Masik
2023-01-21 13:51:59 +01:00
parent fd5ce62b0e
commit f7d315d4cc
18 changed files with 1117 additions and 18 deletions
@@ -0,0 +1,89 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilBefristung extends Vertragsbestandteil
{
protected $befristet;
protected $befristet_bis;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_BEFRISTUNG);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->befristet) && $this->setBefristet($data->befristet);
isset($data->befristet_bis) && $this->setBefristetBis($data->befristet_bis);
}
/**
* Get the value of befristet
*/
public function getBefristet()
{
return $this->befristet;
}
/**
* Set the value of befristet
*/
public function setBefristet($befristet): self
{
$this->befristet = $befristet;
return $this;
}
/**
* Get the value of befristet_bis
*/
public function getBefristetBis()
{
return $this->befristet_bis;
}
/**
* Set the value of befristet_bis
*/
public function setBefristetBis($befristet_bis): self
{
$this->befristet_bis = $befristet_bis;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'befristet' => $this->getBefristet(),
'befristet_bis' => $this->getBefristetBis()
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
befristet: {$this->getBefristet()}
befristet_bis: {$this->getBefristetBis()}
EOTXT;
return parent::__toString() . $txt;
}
}
@@ -13,6 +13,15 @@ class VertragsbestandteilFactory
{
const VERTRAGSBESTANDTEIL_STUNDEN = 'stunden';
const VERTRAGSBESTANDTEIL_FUNKTION = 'funktion';
const VERTRAGSBESTANDTEIL_GEHALT = 'gehalt';
const VERTRAGSBESTANDTEIL_FREITEXT = 'freitext';
const VERTRAGSBESTANDTEIL_KARENZ = 'karenz';
const VERTRAGSBESTANDTEIL_BEFRISTUNG = 'befristung';
const VERTRAGSBESTANDTEIL_KUENDIGUNGSFRIST = 'kuendigungsfrist';
const VERTRAGSBESTANDTEIL_KV = 'kv';
const VERTRAGSBESTANDTEIL_URLAUBSANSPRUCH = 'urlaubsanspruch';
const VERTRAGSBESTANDTEIL_ZEITAUFZEICHNUNG = 'zeitaufzeichnung';
const VERTRAGSBESTANDTEIL_LEHRE = 'lehre';
public static function getVertragsbestandteil($data)
{
@@ -36,7 +45,12 @@ class VertragsbestandteilFactory
$vertragsbestandteil = new VertragsbestandteilFunktion();
$vertragsbestandteil->hydrateByStdClass($data);
break;
case self::VERTRAGSBESTANDTEIL_GEHALT:
$vertragsbestandteil = new VertragsbestandteilGehalt();
$vertragsbestandteil->hydrateByStdClass($data);
break;
default:
throw new Exception('Unknown vertragsbestandteiltyp_kurzbz '
. $vertragsbestandteiltyp_kurzbz);
@@ -63,6 +77,12 @@ class VertragsbestandteilFactory
'VertragsbestandteilFunktion_model');
$vertragsbestandteildbmodel = $CI->VertragsbestandteilFunktion_model;
break;
case self::VERTRAGSBESTANDTEIL_GEHALT:
$CI->load->model('vertragsbestandteil/VertragsbestandteilGehalt_model',
'VertragsbestandteilGehalt_model');
$vertragsbestandteildbmodel = $CI->VertragsbestandteilGehalt_model;
break;
default:
throw new Exception('Unknown vertragsbestandteil_kurzbz '
@@ -0,0 +1,107 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilFreitext extends Vertragsbestandteil
{
protected $anmerkung;
protected $kuendigungrelevant;
protected $freitexttyp_kurzbz;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_FREITEXT);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->anmerkung) && $this->setAnmerkung($data->anmerkung);
isset($data->kuendigungrelevant) && $this->setKuendigungrelevant($data->kuendigungrelevant);
isset($data->freitexttyp_kurzbz) && $this->setFreitexttypKurzbz($data->freitexttyp_kurzbz);
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'anmerkung' => $this->getAnmerkung(),
'kuendigungrelevant' => $this->getKuendigungrelevant(),
'freitexttyp_kurzbz' => $this->getFreitexttypKurzbz()
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
anmerkung: {$this->getAnmerkung()}
kuendigungrelevant: {$this->getKuendigungrelevant()}
freitexttyp_kurzbz: {$this->getFreitexttypKurzbz()}
EOTXT;
return parent::__toString() . $txt;
}
/**
* Get the value of anmerkung
*/
public function getAnmerkung()
{
return $this->anmerkung;
}
/**
* Set the value of anmerkung
*/
public function setAnmerkung($anmerkung): self
{
$this->anmerkung = $anmerkung;
return $this;
}
/**
* Get the value of kuendigungrelevant
*/
public function getKuendigungrelevant()
{
return $this->kuendigungrelevant;
}
/**
* Set the value of kuendigungrelevant
*/
public function setKuendigungrelevant($kuendigungrelevant): self
{
$this->kuendigungrelevant = $kuendigungrelevant;
return $this;
}
/**
* Get the value of freitexttyp_kurzbz
*/
public function getFreitexttypKurzbz()
{
return $this->freitexttyp_kurzbz;
}
/**
* Set the value of freitexttyp_kurzbz
*/
public function setFreitexttypKurzbz($freitexttyp_kurzbz): self
{
$this->freitexttyp_kurzbz = $freitexttyp_kurzbz;
return $this;
}
}
@@ -0,0 +1,245 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
/**
* Salary always depends on employment (Dienstverhältnis) and optionally on part of contract (Vetragsbestandteil)
*/
class VertragsbestandteilGehalt extends Vertragsbestandteil
{
protected $gehaltsbestandteil_id;
protected $gehalt_von;
protected $gehalt_bis;
protected $anmerkung;
protected $grundbetrag;
protected $betrag_valorisiert;
protected $valorisieren;
protected $gehalt_dienstverhaeltnis_id;
protected $gehaltstyp_kurzbz;
protected $valorisierungssperre;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_GEHALT);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->gehalt_von) && $this->setGehaltVon($data->gehalt_von);
isset($data->gehalt_bis) && $this->setGehaltBis($data->gehalt_bis);
isset($data->anmerkung) && $this->setAnmerkung($data->anmerkung);
isset($data->gehalt_dienstverhaeltnis_id) && $this->setGehaltDienstverhaeltnisID($data->gehalt_dienstverhaeltnis_id);
isset($data->gehaltstyp_kurzbz) && $this->setGehaltstypKurzbz($data->gehaltstyp_kurzbz);
isset($data->valorisierungssperre) && $this->setValorisierungssperre($data->valorisierungssperre);
}
public function getGehaltVon()
{
return $this->gehalt_von;
}
public function getGehaltBis()
{
return $this->gehalt_bis;
}
public function setGehaltVon($von)
{
$this->gehalt_von = $von;
return $this;
}
public function setGehaltBis($bis)
{
$this->gehalt_bis = $bis;
return $this;
}
/**
* Get the value of gehaltsbestandteil_id
*/
public function getGehaltsbestandteilId()
{
return $this->gehaltsbestandteil_id;
}
/**
* Set the value of gehaltsbestandteil_id
*/
public function setGehaltsbestandteilId($gehaltsbestandteil_id): self
{
$this->gehaltsbestandteil_id = $gehaltsbestandteil_id;
return $this;
}
/**
* Get the value of anmerkung
*/
public function getAnmerkung()
{
return $this->anmerkung;
}
/**
* Set the value of anmerkung
*/
public function setAnmerkung($anmerkung): self
{
$this->anmerkung = $anmerkung;
return $this;
}
/**
* Get the value of grundbetrag
*/
public function getGrundbetrag()
{
return $this->grundbetrag;
}
/**
* Set the value of grundbetrag
*/
public function setGrundbetrag($grundbetrag): self
{
$this->grundbetrag = $grundbetrag;
return $this;
}
/**
* Get the value of betrag_valorisiert
*/
public function getBetragValorisiert()
{
return $this->betrag_valorisiert;
}
/**
* Set the value of betrag_valorisiert
*/
public function setBetragValorisiert($betrag_valorisiert): self
{
$this->betrag_valorisiert = $betrag_valorisiert;
return $this;
}
/**
* Get the value of valorisieren
*/
public function getValorisieren()
{
return $this->valorisieren;
}
/**
* Set the value of valorisieren
*/
public function setValorisieren($valorisieren): self
{
$this->valorisieren = $valorisieren;
return $this;
}
/**
* Get the value of dienstverhaeltnis_id
*/
public function getGehaltDienstverhaeltnisID()
{
return $this->gehalt_dienstverhaeltnis_id;
}
/**
* Set the value of dienstverhaeltnis_id
*/
public function setGehaltDienstverhaeltnisID($dienstverhaeltnis_id): self
{
$this->gehalt_dienstverhaeltnis_id = $dienstverhaeltnis_id;
return $this;
}
/**
* Get the value of gehaltstyp_kurzbz
*/
public function getGehaltstypKurzbz()
{
return $this->gehaltstyp_kurzbz;
}
/**
* Set the value of gehaltstyp_kurzbz
*/
public function setGehaltstypKurzbz($gehaltstyp_kurzbz): self
{
$this->gehaltstyp_kurzbz = $gehaltstyp_kurzbz;
return $this;
}
/**
* Get the value of valorisierungssperre
*/
public function getValorisierungssperre()
{
return $this->valorisierungssperre;
}
/**
* Set the value of valorisierungssperre
*/
public function setValorisierungssperre($valorisierungssperre): self
{
$this->valorisierungssperre = $valorisierungssperre;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'von' => $this->getVon(),
'bis' => $this->getBis(),
'gehalt_von' => $this->getGehaltVon(),
'gehalt_bis' => $this->getGehaltBis(),
'gehalt_dienstverhaeltnis_id' => $this->getGehaltDienstverhaeltnisID(),
'grundbetrag' => $this->getGrundbetrag(),
'betrag_valorisiert' => $this->getBetragValorisiert(),
'valorisieren' => $this->getValorisieren(),
'gehaltstyp_kurzbz' => $this->getGehaltstypKurzbz(),
'valorisierungssperre' => $this->getValorisierungssperre(),
'anmerkung' => $this->getAnmerkung()
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
von: {$this->getVon()}
bis: {$this->getBis()}
grundbetrag: {$this->getGrundbetrag()}
valorisieren: {$this->getValorisieren()}
EOTXT;
return parent::__toString() . $txt;
}
}
@@ -0,0 +1,108 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilKarenz extends Vertragsbestandteil
{
protected $karenztyp_kurzbz;
protected $geburtstermin;
protected $geburtstermin_geplant;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_KARENZ);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->karenztyp_kurzbz) && $this->setKarenztypKurzbz($data->karenztyp_kurzbz);
isset($data->geburtstermin_geplant) && $this->setGeburtsterminGeplant($data->geburtstermin_geplant);
isset($data->geburtstermin) && $this->setGeburtstermin($data->geburtstermin);
}
/**
* Get the value of karenztyp_kurzbz
*/
public function getKarenztypKurzbz()
{
return $this->karenztyp_kurzbz;
}
/**
* Set the value of karenztyp_kurzbz
*/
public function setKarenztypKurzbz($karenztyp_kurzbz): self
{
$this->karenztyp_kurzbz = $karenztyp_kurzbz;
return $this;
}
/**
* Get the value of geburtstermin
*/
public function getGeburtstermin()
{
return $this->geburtstermin;
}
/**
* Set the value of geburtstermin
*/
public function setGeburtstermin($geburtstermin): self
{
$this->geburtstermin = $geburtstermin;
return $this;
}
/**
* Get the value of geburtstermin_geplant
*/
public function getGeburtsterminGeplant()
{
return $this->geburtstermin_geplant;
}
/**
* Set the value of geburtstermin_geplant
*/
public function setGeburtsterminGeplant($geburtstermin_geplant): self
{
$this->geburtstermin_geplant = $geburtstermin_geplant;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'karenztyp_kurzbz' => $this->getKarenztypKurzbz(),
'geburtstermin' => $this->getGeburtstermin(),
'geburtstermin_geplant' => $this->getGeburtsterminGeplant()
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
karenztyp_kurzbz: {$this->getKarenztypKurzbz()}
geburtstermin: {$this->getGeburtstermin()}
geburtstermin_geplant: {$this->getGeburtsterminGeplant()}
EOTXT;
return parent::__toString() . $txt;
}
}
@@ -0,0 +1,87 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilKuendigungsfrist extends Vertragsbestandteil
{
protected $arbeitgeber_frist;
protected $arbeitnehmer_frist;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_KUENDIGUNGSFRIST);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->arbeitgeber_frist) && $this->setArbeitgeberFrist($data->arbeitgeber_frist);
isset($data->arbeitnehmer_frist) && $this->setArbeitnehmerFrist($data->arbeitnehmer_frist);
}
/**
* Get the value of arbeitgeber_frist
*/
public function getArbeitgeberFrist()
{
return $this->arbeitgeber_frist;
}
/**
* Set the value of arbeitgeber_frist
*/
public function setArbeitgeberFrist($arbeitgeber_frist): self
{
$this->arbeitgeber_frist = $arbeitgeber_frist;
return $this;
}
/**
* Get the value of arbeitnehmer_frist
*/
public function getArbeitnehmerFrist()
{
return $this->arbeitnehmer_frist;
}
/**
* Set the value of arbeitnehmer_frist
*/
public function setArbeitnehmerFrist($arbeitnehmer_frist): self
{
$this->arbeitnehmer_frist = $arbeitnehmer_frist;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'arbeitgeber_frist' => $this->getArbeitgeberFrist(),
'arbeitnehmer_frist' => $this->getArbeitnehmerFrist()
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
arbeitgeber_frist: {$this->getArbeitgeberFrist()}
arbeitnehmer_frist: {$this->getArbeitnehmerFrist()}
EOTXT;
return parent::__toString() . $txt;
}
}
@@ -0,0 +1,65 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilLehre extends Vertragsbestandteil
{
protected $inkludierte_lehre;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_LEHRE);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->inkludierte_lehre) && $this->setInkludierteLehre($data->inkludierte_lehre);
}
/**
* Get the value of inkludierte_lehre
*/
public function getInkludierteLehre()
{
return $this->inkludierte_lehre;
}
/**
* Set the value of inkludierte_lehre
*/
public function setInkludierteLehre($inkludierte_lehre): self
{
$this->inkludierte_lehre = $inkludierte_lehre;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'inkludierte_lehre' => $this->getInkludierteLehre(),
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
inkludierte_lehre: {$this->getInkludierteLehre()}
EOTXT;
return parent::__toString() . $txt;
}
}
@@ -0,0 +1,65 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilUrlaubsanspruch extends Vertragsbestandteil
{
protected $tage;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_URLAUBSANSPRUCH);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->tage) && $this->setTage($data->tage);
}
/**
* Get the value of tage
*/
public function getTage()
{
return $this->tage;
}
/**
* Set the value of tage
*/
public function setTage($tage): self
{
$this->tage = $tage;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'tage' => $this->getTage(),
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
tage: {$this->getTage()}
EOTXT;
return parent::__toString() . $txt;
}
}
@@ -0,0 +1,109 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilZeitaufzeichnung extends Vertragsbestandteil
{
protected $zeitaufzeichnung;
protected $azgrelevant;
protected $homeoffice;
public function __construct()
{
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_ZEITAUFZEICHNUNG);
}
public function hydrateByStdClass($data)
{
parent::hydrateByStdClass($data);
isset($data->zeitaufzeichnung) && $this->setZeitaufzeichnung($data->zeitaufzeichnung);
isset($data->azgrelevant) && $this->setAzgrelevant($data->azgrelevant);
isset($data->homeoffice) && $this->setHomeoffice($data->homeoffice);
}
/**
* Get the value of zeitaufzeichnung
*/
public function getZeitaufzeichnung()
{
return $this->zeitaufzeichnung;
}
/**
* Set the value of zeitaufzeichnung
*/
public function setZeitaufzeichnung($zeitaufzeichnung): self
{
$this->zeitaufzeichnung = $zeitaufzeichnung;
return $this;
}
/**
* Get the value of azgrelevant
*/
public function getAzgrelevant()
{
return $this->azgrelevant;
}
/**
* Set the value of azgrelevant
*/
public function setAzgrelevant($azgrelevant): self
{
$this->azgrelevant = $azgrelevant;
return $this;
}
/**
* Get the value of homeoffice
*/
public function getHomeoffice()
{
return $this->homeoffice;
}
/**
* Set the value of homeoffice
*/
public function setHomeoffice($homeoffice): self
{
$this->homeoffice = $homeoffice;
return $this;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'zeitaufzeichnung' => $this->getZeitaufzeichnung(),
'azgrelevant' => $this->getAzgrelevant(),
'homeoffice' => $this->getHomeoffice()
);
$tmp = array_filter($tmp, function($v) {
return !is_null($v);
});
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
zeitaufzeichnung: {$this->getZeitaufzeichnung()}
azgrelevant: {$this->getAzgrelevant()}
homeoffice: {$this->getHomeoffice()}
EOTXT;
return parent::__toString() . $txt;
}
}