<?php

namespace App\Policies;

// use App\Models\Admin Admins;

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

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

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

    }
    public function delete($user)
    {
        return $user->role->havePermission(Subscription::SUBSCRIPTION_DELETE);
    }
    public function list($user)
    {
        return $user->role->havePermission(Subscription::SUBSCRIPTION_DELETE);
    }
}
