<?php


namespace AutoAdmin\Bundle\Content\Entity\Traits;

use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

trait PublishableTrait
{
    #[ORM\Column(name: 'publishable', type: Types::BOOLEAN, options: ['default' => true])]
    #[Groups(['publishable'])]
    protected bool $publishable = true;

    public function isPublishable(): bool
    {
        return $this->publishable;
    }

    public function setPublishable($boolean): void
    {
        $this->publishable = $boolean;
    }
}
