包装方式

This commit is contained in:
2025-02-20 11:00:22 +08:00
parent 8284af0173
commit 910c431d7d
4 changed files with 104 additions and 4 deletions

View File

@@ -0,0 +1,27 @@
<?php
/*
* @author: liudiao1992
* @Date: 2023-09-18 15:29:29
* @Description:
*/
namespace common\models\oldDb;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
class PackageMethod extends \common\modelsgii\oldDb\PackageMethod
{
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
],
],
];
}
}