<?php

namespace Entity\Model\Metadata;

use Helpers\Outil\Sql;

/**
 * @property string $demDeleg mark the Consultation to be processed by the Demandeurs of its Demande d'Achat
 */
class AoEntetExt extends EntityMeta
{
    public function __construct(string $aoId)
    {
        parent::__construct(
            'AO_E',
            $aoId,
            0,
            [
                'demDeleg' => 'F',
            ]
        );
    }

    public function setDemDeleg(bool $flag) :self
    {
        $this->demDeleg = Sql::setBoolSqlText($flag);
        return $this;
    }

    public function getDemDeleg() :bool
    {
        return Sql::toBool($this->demDeleg);
    }
}
