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