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