<?php
namespace App\Entity;
use App\Repository\VariableOptionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VariableOptionRepository::class)]
class VariableOption
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'variableOptions')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?Variable $variable = null;
#[ORM\Column(length: 50)]
private ?string $label = null;
#[ORM\Column(length: 8, options: ['default' => '000000'])]
private string $color_font = '000000';
#[ORM\Column(length: 8, options: ['default' => 'ffffff'])]
private string $color_back = 'ffffff';
#[ORM\Column(type: Types::BOOLEAN, options: ['default' => true])]
private bool $actif = true;
#[ORM\Column(type: Types::BOOLEAN, options: ['default' => false])]
private bool $isDefault = false;
#[ORM\Column]
private ?int $ordre = null;
public function getId(): ?int
{
return $this->id;
}
public function getVariable(): ?Variable
{
return $this->variable;
}
public function setVariable(?Variable $variable): static
{
$this->variable = $variable;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): static
{
$this->label = $label;
return $this;
}
public function getColorFont(): string
{
return $this->color_font;
}
public function setColorFont(string $color_font): static
{
$this->color_font = $color_font;
return $this;
}
public function getColorBack(): string
{
return $this->color_back;
}
public function setColorBack(string $color_back): static
{
$this->color_back = $color_back;
return $this;
}
public function getActif(): bool
{
return $this->actif;
}
public function setActif(bool $actif): static
{
$this->actif = $actif;
return $this;
}
public function getOrdre(): ?int
{
return $this->ordre;
}
public function setOrdre(int $ordre): static
{
$this->ordre = $ordre;
return $this;
}
public function getIsDefault(): bool
{
return $this->isDefault;
}
public function setIsDefault(bool $isDefault): static
{
$this->isDefault = $isDefault;
return $this;
}
}