* изменил таблицы в основном отчете

* изменил метод сохранения пациентов основного отчета
This commit is contained in:
brusnitsyn
2026-05-07 18:00:43 +09:00
parent 723ccee8d3
commit bb9e67ab3d
25 changed files with 1438 additions and 52 deletions

42
app/Models/ReportDuty.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ReportDuty extends Model
{
protected $fillable = [
'report_date',
'sent_at',
'period_type',
'period_start',
'period_end',
'status_id',
'rf_lpudoctor_id',
'rf_department_id',
'rf_user_id',
];
protected $casts = [
'report_date' => 'date:Y-m-d',
'sent_at' => 'datetime:Y-m-d H:i:s',
'period_start' => 'datetime:Y-m-d H:i:s',
'period_end' => 'datetime:Y-m-d H:i:s',
];
public function department()
{
return $this->belongsTo(Department::class, 'rf_department_id', 'department_id');
}
public function patients()
{
return $this->hasMany(ReportNursePatient::class, 'report_nurse_id');
}
public function status()
{
return $this->belongsTo(ReportStatus::class);
}
}