Added OrderJournal

This commit is contained in:
Frank Schubert
2021-10-12 22:03:31 +02:00
parent a212d4b4bc
commit c464e111e8
5 changed files with 283 additions and 8 deletions

View File

@@ -0,0 +1,38 @@
<?php
class OrderJournal extends mfBaseModel {
private $order;
private $creator;
private $editor;
public function getProperty($name) {
if($this->$name == null) {
if(!$this->id) {
return null;
}
if($name == "creator") {
$this->creator = new User($this->create_by);
return $this->creator;
}
if($name == "editor") {
$this->editor = new User($this->edit_by);
return $this->editor;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = new $classname($this->$idfield);
if($this->$name->id) {
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}