Added PreorderStatusflags to PreorderHistory
This commit is contained in:
@@ -10,6 +10,12 @@ class PreorderStatusflag extends mfBaseModel {
|
||||
if($name == "value") {
|
||||
if(!$this->preorder_id) return null;
|
||||
$value = PreorderStatusflagValueModel::getFirst(["preorder_id" => $this->preorder_id, "flag_id" => $this->id]);
|
||||
if(!$value) {
|
||||
$value = PreorderStatusflagValueModel::create([
|
||||
"preorder_id" => $this->preorder_id,
|
||||
"flag_id" => $this->id
|
||||
]);
|
||||
}
|
||||
$this->value = $value;
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user