44 lines
944 B
PHP
44 lines
944 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\MedicalReportFormTemplateFactory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class MedicalReportFormTemplate extends Model
|
|
{
|
|
/** @use HasFactory<MedicalReportFormTemplateFactory> */
|
|
use HasFactory;
|
|
|
|
/**
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'hospital_unit_id',
|
|
'department_key',
|
|
'name',
|
|
'description',
|
|
'schema',
|
|
'is_active',
|
|
];
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'hospital_unit_id' => 'integer',
|
|
'schema' => 'array',
|
|
'is_active' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function hospitalUnit(): BelongsTo
|
|
{
|
|
return $this->belongsTo(HospitalUnit::class);
|
|
}
|
|
}
|