<?php

namespace App\Policies;

use App\Models\MedicalRecord;
use App\Models\User;

class MedicalRecordPolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('medical_records.view');
    }

    public function view(User $user, MedicalRecord $medicalRecord): bool
    {
        return $user->can('medical_records.view');
    }

    public function create(User $user): bool
    {
        return $user->can('medical_records.edit');
    }

    public function update(User $user, MedicalRecord $medicalRecord): bool
    {
        return $user->can('medical_records.edit');
    }

    public function delete(User $user, MedicalRecord $medicalRecord): bool
    {
        return $user->can('medical_records.edit');
    }
}
