<?php

namespace Modules\Commande\Rules;

use Helpers\Outil\Roles;
use Psr\Http\Message\ServerRequestInterface;

class SuiviCommande
{
    protected ServerRequestInterface $request;
    protected \PDO $pdo;
        
    /**
     * __construct
     *
     * @param  ServerRequestInterface $request
     * @return void
     */
    public function __construct(ServerRequestInterface  $request, \PDO $pdo)
    {
        $this->request  = $request;
        $this->pdo      = $pdo;
    }
    
    /**
     * init
     *
     * @return bool
     */
    public function commande() : bool
    {
        if (Roles::droitsUtilisateur($this->pdo, 'HA_CA_VIS')) {
            return true;
        }
        return false;
    }


    /**
     * @return bool
     */
    public function suivi(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function ajoutEvenementCommande(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function suppressionEventCommande(): bool
    {
        return true;
    }

    /**
     * @return bool
     */
    public function modificationtEvenementCommande(): bool
    {
        return true;
    }
}
