Started cpe shipping

This commit is contained in:
Frank Schubert
2021-10-19 23:48:34 +02:00
parent 40be8b1d51
commit 40b32b63ec
8 changed files with 241 additions and 7 deletions
@@ -3,4 +3,50 @@
class Cpeprovisioning extends mfBaseModel {
protected $forcestr = ["wifi_ssid", "wifi_pass"];
private $order;
private $orderproduct;
private $termination;
private $creator;
private $editor;
public function getProperty($name) {
if($this->$name == null) {
if($name == "cpeprovisioning") {
$this->cpeprovisioning = CpeprovisioningModel::getFirst(["orderproduct_id" => $this->id]);
return $this->cpeprovisioning;
}
if($name == "creator") {
if($this->id) {
$this->creator = new User($this->create_by);
return $this->creator;
} else {
return null;
}
}
if($name == "editor") {
if($this->id) {
$this->editor = new User($this->edit_by);
return $this->editor;
} else {
return null;
}
}
$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;
}
}