/** * @return \yii\db\ActiveQuery */ public function getType0() { return $this->hasOne(DType::className(), ['id' => 'type']); }
/** * @return \yii\db\ActiveQuery */ public function getTypes() { return $this->hasMany(DType::className(), ['id' => 'type'])->viaTable('d_firm_d_type', ['firm' => 'id']); }