<?php

namespace App\Policies;

use App\Permissions\Modules\Admin;
use App\Permissions\Modules\Prescription;
// use App\Models\Admin Admins;
use Illuminate\Auth\Access\HandlesAuthorization;

class PrescriptionsPolicy
{
    use HandlesAuthorization;
    private $class_name='Prescription';
    /**
     * Create a new policy instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }
    public function add($user)
    {
        return $user->role->havePermission(Prescription::PRESCRIPTION_ADD);

    }
    public function edit($user)
    {
        return $user->role->havePermission(Prescription::PRESCRIPTION_EDIT);

    }
    public function delete($user)
    {
        return $user->role->havePermission(Prescription::PRESCRIPTION_DELETE);
    }
    public function list($user)
    {
        return $user->role->havePermission(Prescription::PRESCRIPTION_VIEW);
    }
}
