/** * @return \yii\db\ActiveQuery */ public function getAccounts() { return $this->hasMany(AppAccount::className(), ['ID_Contract' => 'ID']); }