<?php

namespace AppBundle\Entity\Billing;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;

/**
 * Définition d'une tranche de quotient familial
 *
 * @Iri("http://schema.org/FamilyQuotient")
 */
#[ORM\Entity]
class FamilyQuotient
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['familyquotient'])]
    private $id;
    /**
     * @var BillingSetting
     */
    #[ORM\ManyToOne(targetEntity: 'BillingSetting', inversedBy: 'familyQuotients')]
    #[ORM\JoinColumn(nullable: false)]
    #[Assert\NotNull]
    #[Groups(['familyquotient'])]
    private $billingSetting;
    /**
     * @var string
     *
     *
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['familyquotient', 'familyquotient_reference', 'payer_list_accessbilling', 'fusion_accesses_accessbilling', 'student_list_accessbilling'])]
    private $sliceName;
    /**
     * @var string
     *
     *
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['familyquotient', 'familyquotient_reference'])]
    private $lowerBound;
    /**
     * @var string
     *
     *
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['familyquotient', 'familyquotient_reference'])]
    private $upperBound;
    /**
     * @var ArrayCollection<AccessBilling>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', mappedBy: 'familyQuotient')]
    #[Groups(['familyquotient_accessbilling'])]
    private $accessBilling;
    /**
     * @var ArrayCollection<IntangibleDiscountDetail>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\IntangibleDiscountDetail', mappedBy: 'familyQuotient')]
    #[Groups(['familyquotient_intangiblediscountdetail'])]
    private $intangibleDiscountDetails;
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->accessBilling = new ArrayCollection();
        $this->intangibleDiscountDetails = new ArrayCollection();
    }
    /**
     * Sets id.
     *
     * @param int $id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }
    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set sliceName
     *
     * @param string $sliceName
     *
     * @return FamilyQuotient
     */
    public function setSliceName($sliceName)
    {
        $this->sliceName = $sliceName;

        return $this;
    }
    /**
     * Get sliceName
     *
     * @return string
     */
    public function getSliceName()
    {
        return $this->sliceName;
    }
    /**
     * Set lowerBound
     *
     * @param string $lowerBound
     *
     * @return FamilyQuotient
     */
    public function setLowerBound($lowerBound)
    {
        $this->lowerBound = $lowerBound;

        return $this;
    }
    /**
     * Get lowerBound
     *
     * @return string
     */
    public function getLowerBound()
    {
        return $this->lowerBound;
    }
    /**
     * Set upperBound
     *
     * @param string $upperBound
     *
     * @return FamilyQuotient
     */
    public function setUpperBound($upperBound)
    {
        $this->upperBound = $upperBound;

        return $this;
    }
    /**
     * Get upperBound
     *
     * @return string
     */
    public function getUpperBound()
    {
        return $this->upperBound;
    }
    /**
     * Set billingSetting
     *
     * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
     *
     * @return FamilyQuotient
     */
    public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting)
    {
        $this->billingSetting = $billingSetting;

        return $this;
    }
    /**
     * Get billingSetting
     *
     * @return \AppBundle\Entity\Billing\BillingSetting
     */
    public function getBillingSetting()
    {
        return $this->billingSetting;
    }
    /**
     * Add accessBilling
     *
     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
     *
     * @return FamilyQuotient
     */
    public function addAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
    {
        $this->accessBilling[] = $accessBilling;

        return $this;
    }
    /**
     * Remove accessBilling
     *
     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
     */
    public function removeAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
    {
        $this->accessBilling->removeElement($accessBilling);
    }
    /**
     * Get accessBilling
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAccessBilling()
    {
        return $this->accessBilling;
    }
    /**
     * Add intangibleDiscountDetail
     *
     * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
     *
     * @return FamilyQuotient
     */
    public function addIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
    {
        $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;

        return $this;
    }
    /**
     * Remove intangibleDiscountDetail
     *
     * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
     */
    public function removeIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
    {
        $this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail);
    }
    /**
     * Get intangibleDiscountDetails
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getIntangibleDiscountDetails()
    {
        return $this->intangibleDiscountDetails;
    }
}
