use yii\behaviors\TimestampBehavior; use yii\behaviors\BlameableBehavior; use yii\db\Expression; /** * @inheritdoc * 插入创建者及创建时间/更新者及更新时间 */ public function behaviors() { return [ [ ‘class‘ => TimestampBehavior::className(), ‘value‘ => new Expression(‘NOW()‘), ], BlameableBehavior::className(), ]; }
时间: 2024-10-09 20:43:05