Add Care Units, beds, and dated staff assignments.
Deploy Ladill Care / deploy (push) Successful in 1m8s

Models employment as department/unit/shift placements with primary and temporary kinds so nurses are not permanently bound to a ward.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-20 10:04:39 +00:00
co-authored by Cursor
parent 56a663a777
commit 3735be3425
21 changed files with 1595 additions and 0 deletions
+6
View File
@@ -5,6 +5,7 @@ namespace App\Models;
use App\Models\Concerns\BelongsToOwner;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Member extends Model
{
@@ -24,6 +25,11 @@ class Member extends Model
return $this->belongsTo(Branch::class, 'branch_id');
}
public function staffAssignments(): HasMany
{
return $this->hasMany(StaffAssignment::class, 'member_id');
}
public function hasRole(string ...$roles): bool
{
return in_array($this->role, $roles, true);