| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace UCore\DcatAdmin\ActionLog;
- use App\Module\System\Models\AdminActionlog;
- abstract class BaseLog implements InterfaceLog
- {
- public $objectClass;
- public $admin_id;
- public $before;
- public $after;
- public $url;
- public $unid = RUN_UNIQID;
- public $status = 0;
- public $p1 = null;
- public function __destruct()
- {
- $model = new AdminActionlog();
- $model->object_class = $this->objectClass;
- $model->admin_id = $this->admin_id;
- $model->before = $this->before??[];
- if(!$this->after){
- $this->after = 'is null or empty ';
- }
- $model->after = $this->after;
- $model->url = $this->url;
- $model->unid = $this->unid;
- $model->type1 = static::TYPE;
- $model->status = $this->status;
- $model->p1 = serialize($this->p1);
- $model->save();
- }
- }
|