/** * @return \yii\db\ActiveQuery */ public function getOptHistories() { return $this->hasMany(OptHistory::className(), ['user' => 'id']); }