/** * Получаем договор */ public function getAgreement() { return $this->hasOne(Agreement::className(), ['id' => 'agreement_id']); }