first commit
Some checks failed
tests / ci (8.5) (push) Has been cancelled
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled

This commit is contained in:
brusnitsyn
2026-04-03 17:20:05 +09:00
commit 3edc8e667e
358 changed files with 39258 additions and 0 deletions

40
app/Models/Department.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Database\Factories\DepartmentFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Department extends Model
{
/** @use HasFactory<DepartmentFactory> */
use HasFactory;
/**
* @var array<int, string>
*/
protected $fillable = [
'code',
'name',
'hospital_unit_id',
'is_active',
];
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'hospital_unit_id' => 'integer',
'is_active' => 'boolean',
];
}
public function hospitalUnit(): BelongsTo
{
return $this->belongsTo(HospitalUnit::class);
}
}