<?php

namespace App\Entity;

use App\Repository\FormulesRestrictionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: FormulesRestrictionRepository::class)]
class FormulesRestriction
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\OneToOne(inversedBy: 'formulesRestriction', cascade: ['persist', 'remove'])]
    private ?Formules $formule = null;

    #[ORM\Column]
    private ?int $nbStructureMax = null;

    #[ORM\Column(type: Types::JSON, nullable: true)]
    private ?array $restrictionConfig = null;

    #[ORM\Column(nullable: true)]
    private ?int $nbAlimentaireMax = null;

    #[ORM\Column(nullable: true)]
    private ?int $nbBarhumsMax = null;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getFormule(): ?Formules
    {
        return $this->formule;
    }

    public function setFormule(?Formules $formule): static
    {
        $this->formule = $formule;

        return $this;
    }

    public function getNbStructureMax(): ?int
    {
        return $this->nbStructureMax;
    }

    public function setNbStructureMax(int $nbStructureMax): static
    {
        $this->nbStructureMax = $nbStructureMax;

        return $this;
    }

    public function getRestrictionConfig(): ?array
    {
        return $this->restrictionConfig;
    }

    public function setRestrictionConfig(?array $restrictionConfig): static
    {
        $this->restrictionConfig = $restrictionConfig;

        return $this;
    }

    public function getNbAlimentaireMax(): ?int
    {
        return $this->nbAlimentaireMax;
    }

    public function setNbAlimentaireMax(?int $nbAlimentaireMax): static
    {
        $this->nbAlimentaireMax = $nbAlimentaireMax;

        return $this;
    }

    public function getNbBarhumsMax(): ?int
    {
        return $this->nbBarhumsMax;
    }

    public function setNbBarhumsMax(?int $nbBarhumsMax): static
    {
        $this->nbBarhumsMax = $nbBarhumsMax;

        return $this;
    }
}
