16 lines
499 B
PHP
16 lines
499 B
PHP
<?php
|
|
|
|
class PreorderStatusflagValue extends mfBaseModel {
|
|
|
|
protected function afterSave() {
|
|
if($this->_old_data->value != $this->value) {
|
|
$history = PreorderHistoryModel::create([
|
|
"preorder_id" => $this->preorder_id,
|
|
"key" => "preorderstatusflag-".$this->flag_id."-value",
|
|
"old_value" => $this->_old_data->value,
|
|
"new_value" => $this->data->value
|
|
]);
|
|
$history->save();
|
|
}
|
|
}
|
|
} |