|
|
|
@ -3,6 +3,7 @@ namespace common\models;
|
|
|
|
|
|
|
|
|
|
use Yii; |
|
|
|
|
use yii\base\NotSupportedException; |
|
|
|
|
use yii\behaviors\TimestampBehavior; |
|
|
|
|
use yii\db\ActiveRecord; |
|
|
|
|
use yii\web\IdentityInterface; |
|
|
|
|
|
|
|
|
@ -41,13 +42,7 @@ class User extends ActiveRecord implements IdentityInterface
|
|
|
|
|
public function behaviors() |
|
|
|
|
{ |
|
|
|
|
return [ |
|
|
|
|
'timestamp' => [ |
|
|
|
|
'class' => 'yii\behaviors\TimestampBehavior', |
|
|
|
|
'attributes' => [ |
|
|
|
|
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], |
|
|
|
|
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'], |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
TimestampBehavior::className(), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|