hasMany(DepartmentMetrikaDefault::class, 'rf_department_id', 'department_id'); } public function observationPatients(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ObservationPatient::class, 'rf_department_id', 'department_id'); } public function reports(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Report::class, 'rf_department_id', 'department_id'); } public function departmentType() { return $this->belongsTo(DepartmentType::class, 'rf_department_type', 'department_type_id'); } }