/** * @return \yii\db\ActiveQuery */ public function getUserTypes() { return $this->hasMany(UserType::className(), ['role' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getUserType() { return $this->hasOne(UserType::className(), ['id' => 'user_type']); }