<?php

namespace App\Policies;

// use App\Models\Admin Admins;

use App\Permissions\Modules\Role;
use App\Permissions\Modules\Subscription;
use App\Permissions\Modules\AdminPermissions;
use App\Permissions\Modules\Appointment;
use Illuminate\Auth\Access\HandlesAuthorization;

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

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

    }
    public function delete($user)
    {
        return $user->role->havePermission(Appointment::APPOINTMENT_ADD);
    }
    public function list($user)
    {
        return $user->role->havePermission(Appointment::APPOINTMENT_ADD);
    }
    public function permissions($user){
        return $user->role->havePermission(Appointment::APPOINTMENT_ADD);
    }
    public function book_appointment($user){
        return $user->role->havePermission(Appointment::APPOINTMENT_BOOK_AN_APPOINTMENT);
    }
    public function meeting_history($user){
        return $user->role->havePermission(Appointment::APPOINTMENT_MEETING_HISTORY);
    }
}
