记录日志测试

This commit is contained in:
2024-12-04 09:28:48 +08:00
parent 73fef0b850
commit ae763025fc
4 changed files with 187 additions and 7 deletions

21
common/models/OpLog.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
class OpLog extends \common\modelsgii\Address
{
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
],
],
];
}
}