/** * @return \yii\db\ActiveQuery */ public function getOrders() { return $this->hasMany(Orders::className(), ['dap_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getOrder() { return $this->hasOne(Orders::className(), ['id' => 'order_id']); }