<?php

namespace AppBundle\Entity\Billing;

use AppBundle\Entity\AccessAndFunction\Access;
use AppBundle\Entity\Organization\Organization;
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;
use AppBundle\Annotation\DefaultField;

/**
 * Paramètres généraux des exports de Bill
 *
 * @Iri("http://schema.org/BillingExportSetting")
 */
#[ORM\Entity]
class BillingExportSetting
{
    //todo: INSERT INTO BillingExportSetting
    //(`id`, `organization_id`, `idPost`, `idCollTipi`, `codColl`, `codBud`, `codProd`, `libelleColBud`,
    //`gestionnaire`, `nameComptable`, `updateDate`, `updatedBy`)
    //SELECT `id`, `organization_id`, `idPost`, `idCollTipi`, `codColl`, `codBud`, `codProd`, `libelleColBud`,
    //`gestionnaire` , `nameComptable`, `updateDate`, `updatedBy`
    //FROM PesSetting
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['billingexportsetting'])]
    private $id;
    /**
     * @var Organization
     *
     * @DefaultField
     */
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'billingExportSetting', fetch: 'EAGER')]
    #[ORM\JoinColumn(nullable: false)]
    #[Assert\NotNull]
    #[Groups(['billingexportsetting'])]
    private $organization;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 14, nullable: true)]
    #[Assert\Length(max: 14, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $idPost;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $idColl;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $idCollTipi;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $codColl;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $codBud;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $codProd;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $libelleColBud;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $gestionnaire;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $nameComptable;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorIban;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorBic;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorIcs;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorLineOneAddress;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorLineTwoAddress;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorPublicInstitution;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $creditorType;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $court;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 10, nullable: true)]
    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $budgetaryArticleCode;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 10, nullable: true)]
    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $rentalBudgetaryArticleCode;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 15, nullable: true)]
    #[Assert\Length(max: 15, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $serviceCode;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 10, nullable: true)]
    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $codFunction;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 6, nullable: true)]
    #[Assert\Length(max: 6, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $payfipCustomerNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', options: ['default' => 'TEST'])]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PayfipStatusEnum', 'toArray'])]
    #[Groups(['billingexportsetting'])]
    private $payfipStatus = "TEST";
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 250, nullable: true)]
    #[Assert\Length(max: 250, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $bergerLevraultSamplingMethod;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 3, nullable: true)]
    #[Assert\Length(max: 3, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $establishmentCode;
    /**
     * @var Access
     */
    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access')]
    #[Groups(['billingexportsetting'])]
    private $stageManagers;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Groups(['billingexportsetting'])]
    #[Assert\NotNull]
    private $payfipSeveralPayments = true;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 4, nullable: true)]
    #[Assert\Length(max: 4, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $lotReference;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 2, nullable: true)]
    #[Assert\Length(max: 2, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $directDebitCode;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 10, nullable: true)]
    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $functionalCode;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 10, nullable: true)]
    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $antenna;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['billingexportsetting'])]
    private $teneurName;
    /**
     * @var Bill
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\SddTeneur')]
    #[ORM\JoinColumn(nullable: true)]
    #[Groups(['billingexportsetting'])]
    private $teneur;
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->stageManagers = new ArrayCollection();
    }
    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set organization
     *
     * @param \AppBundle\Entity\Organization\Organization $organization
     *
     * @return BillingExportSetting
     */
    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
    {
        $this->organization = $organization;

        return $this;
    }
    /**
     * Get organization
     *
     * @return \AppBundle\Entity\Organization\Organization
     */
    public function getOrganization()
    {
        return $this->organization;
    }
    /**
     * Set idPost
     *
     * @param string $idPost
     *
     * @return BillingExportSetting
     */
    public function setIdPost($idPost)
    {
        $this->idPost = $idPost;

        return $this;
    }
    /**
     * Get idPost
     *
     * @return string
     */
    public function getIdPost()
    {
        return $this->idPost;
    }
    /**
     * Set idColl
     *
     * @param string $idColl
     *
     * @return BillingExportSetting
     */
    public function setIdColl($idColl)
    {
        $this->idColl = $idColl;

        return $this;
    }
    /**
     * Get idColl
     *
     * @return string
     */
    public function getIdColl()
    {
        return $this->idColl;
    }
    /**
     * Set idCollTipi
     *
     * @param string $idCollTipi
     *
     * @return BillingExportSetting
     */
    public function setIdCollTipi($idCollTipi)
    {
        $this->idCollTipi = $idCollTipi;

        return $this;
    }
    /**
     * Get idCollTipi
     *
     * @return string
     */
    public function getIdCollTipi()
    {
        return $this->idCollTipi;
    }
    /**
     * Set codColl
     *
     * @param string $codColl
     *
     * @return BillingExportSetting
     */
    public function setCodColl($codColl)
    {
        $this->codColl = $codColl;

        return $this;
    }
    /**
     * Get codColl
     *
     * @return string
     */
    public function getCodColl()
    {
        return $this->codColl;
    }
    /**
     * Set codBud
     *
     * @param string $codBud
     *
     * @return BillingExportSetting
     */
    public function setCodBud($codBud)
    {
        $this->codBud = $codBud;

        return $this;
    }
    /**
     * Get codBud
     *
     * @return string
     */
    public function getCodBud()
    {
        return $this->codBud;
    }
    /**
     * Set codProd
     *
     * @param string $codProd
     *
     * @return BillingExportSetting
     */
    public function setCodProd($codProd)
    {
        $this->codProd = $codProd;

        return $this;
    }
    /**
     * Get codProd
     *
     * @return string
     */
    public function getCodProd()
    {
        return $this->codProd;
    }
    /**
     * Get codProdPayFip
     *
     * @return string
     */
    public function getCodProdPayFip()
    {
        return mb_substr($this->codProd, 0, 2);
    }
    /**
     * Set libelleColBud
     *
     * @param string $libelleColBud
     *
     * @return BillingExportSetting
     */
    public function setLibelleColBud($libelleColBud)
    {
        $this->libelleColBud = $libelleColBud;

        return $this;
    }
    /**
     * Get libelleColBud
     *
     * @return string
     */
    public function getLibelleColBud()
    {
        return $this->libelleColBud;
    }
    /**
     * Set gestionnaire
     *
     * @param string $gestionnaire
     *
     * @return BillingExportSetting
     */
    public function setGestionnaire($gestionnaire)
    {
        $this->gestionnaire = $gestionnaire;

        return $this;
    }
    /**
     * Get gestionnaire
     *
     * @return string
     */
    public function getGestionnaire()
    {
        return $this->gestionnaire;
    }
    /**
     * Set nameComptable
     *
     * @param string $nameComptable
     *
     * @return BillingExportSetting
     */
    public function setNameComptable($nameComptable)
    {
        $this->nameComptable = $nameComptable;

        return $this;
    }
    /**
     * Get nameComptable
     *
     * @return string
     */
    public function getNameComptable()
    {
        return $this->nameComptable;
    }
    /**
     * Set creditorIban
     *
     * @param string $creditorIban
     *
     * @return BillingExportSetting
     */
    public function setCreditorIban($creditorIban)
    {
        $this->creditorIban = $creditorIban;

        return $this;
    }
    /**
     * Get creditorIban
     *
     * @return string
     */
    public function getCreditorIban()
    {
        return $this->creditorIban;
    }
    /**
     * Set creditorBic
     *
     * @param string $creditorBic
     *
     * @return BillingExportSetting
     */
    public function setCreditorBic($creditorBic)
    {
        $this->creditorBic = $creditorBic;

        return $this;
    }
    /**
     * Get creditorBic
     *
     * @return string
     */
    public function getCreditorBic()
    {
        return $this->creditorBic;
    }
    /**
     * Set creditorIcs
     *
     * @param string $creditorIcs
     *
     * @return BillingExportSetting
     */
    public function setCreditorIcs($creditorIcs)
    {
        $this->creditorIcs = $creditorIcs;

        return $this;
    }
    /**
     * Get creditorIcs
     *
     * @return string
     */
    public function getCreditorIcs()
    {
        return $this->creditorIcs;
    }
    /**
     * Set creditorLineOneAddress
     *
     * @param string $creditorLineOneAddress
     *
     * @return BillingExportSetting
     */
    public function setCreditorLineOneAddress($creditorLineOneAddress)
    {
        $this->creditorLineOneAddress = $creditorLineOneAddress;

        return $this;
    }
    /**
     * Get creditorLineOneAddress
     *
     * @return string
     */
    public function getCreditorLineOneAddress()
    {
        return $this->creditorLineOneAddress;
    }
    /**
     * Set creditorLineTwoAddress
     *
     * @param string $creditorLineTwoAddress
     *
     * @return BillingExportSetting
     */
    public function setCreditorLineTwoAddress($creditorLineTwoAddress)
    {
        $this->creditorLineTwoAddress = $creditorLineTwoAddress;

        return $this;
    }
    /**
     * Get creditorLineTwoAddress
     *
     * @return string
     */
    public function getCreditorLineTwoAddress()
    {
        return $this->creditorLineTwoAddress;
    }
    /**
     * Set creditorPublicInstitution
     *
     * @param string $creditorPublicInstitution
     *
     * @return BillingExportSetting
     */
    public function setCreditorPublicInstitution($creditorPublicInstitution)
    {
        $this->creditorPublicInstitution = $creditorPublicInstitution;

        return $this;
    }
    /**
     * Get creditorPublicInstitution
     *
     * @return string
     */
    public function getCreditorPublicInstitution()
    {
        return $this->creditorPublicInstitution;
    }
    /**
     * Set creditorType
     *
     * @param string $creditorType
     *
     * @return BillingExportSetting
     */
    public function setCreditorType($creditorType)
    {
        $this->creditorType = $creditorType;

        return $this;
    }
    /**
     * Get creditorType
     *
     * @return string
     */
    public function getCreditorType()
    {
        return $this->creditorType;
    }
    /**
     * Set creditorName
     *
     * @param string $creditorName
     *
     * @return BillingExportSetting
     */
    public function setCreditorName($creditorName)
    {
        $this->creditorName = $creditorName;

        return $this;
    }
    /**
     * Get creditorName
     *
     * @return string
     */
    public function getCreditorName()
    {
        return $this->creditorName;
    }
    /**
     * Set court
     *
     * @param string $court
     *
     * @return BillingExportSetting
     */
    public function setCourt($court)
    {
        $this->court = $court;

        return $this;
    }
    /**
     * Get court
     *
     * @return string
     */
    public function getCourt()
    {
        return $this->court;
    }
    /**
     * Set budgetaryArticleCode
     *
     * @param string $budgetaryArticleCode
     *
     * @return BillingExportSetting
     */
    public function setBudgetaryArticleCode($budgetaryArticleCode)
    {
        $this->budgetaryArticleCode = $budgetaryArticleCode;

        return $this;
    }
    /**
     * Get budgetaryArticleCode
     *
     * @return string
     */
    public function getBudgetaryArticleCode()
    {
        return $this->budgetaryArticleCode;
    }
    /**
     * Set serviceCode
     *
     * @param string $serviceCode
     *
     * @return BillingExportSetting
     */
    public function setServiceCode($serviceCode)
    {
        $this->serviceCode = $serviceCode;

        return $this;
    }
    /**
     * Get serviceCode
     *
     * @return string
     */
    public function getServiceCode()
    {
        return $this->serviceCode;
    }
    /**
     * Set codFunction
     *
     * @param string $codFunction
     *
     * @return BillingExportSetting
     */
    public function setCodFunction($codFunction)
    {
        $this->codFunction = $codFunction;

        return $this;
    }
    /**
     * Get codFunction
     *
     * @return string
     */
    public function getCodFunction()
    {
        return $this->codFunction;
    }
    /**
     * Set payfipCustomerNumber
     *
     * @param string $payfipCustomerNumber
     *
     * @return BillingExportSetting
     */
    public function setPayfipCustomerNumber($payfipCustomerNumber)
    {
        $this->payfipCustomerNumber = $payfipCustomerNumber;

        return $this;
    }
    /**
     * Get payfipCustomerNumber
     *
     * @return string
     */
    public function getPayfipCustomerNumber()
    {
        return $this->payfipCustomerNumber;
    }
    /**
     * @return string
     */
    public function getBergerLevraultSamplingMethod()
    {
        return $this->bergerLevraultSamplingMethod;
    }
    /**
     * @param string $bergerLevraultSamplingMethod
     */
    public function setBergerLevraultSamplingMethod($bergerLevraultSamplingMethod)
    {
        $this->bergerLevraultSamplingMethod = $bergerLevraultSamplingMethod;
    }
    /**
     * Set establishmentCode
     *
     * @param string $establishmentCode
     *
     * @return BillingExportSetting
     */
    public function setEstablishmentCode($establishmentCode)
    {
        $this->establishmentCode = $establishmentCode;

        return $this;
    }
    /**
     * Get establishmentCode
     *
     * @return string
     */
    public function getEstablishmentCode()
    {
        return $this->establishmentCode;
    }
    /**
     * Set payfipStatus
     *
     * @param string $payfipStatus
     *
     * @return BillingExportSetting
     */
    public function setPayfipStatus($payfipStatus)
    {
        $this->payfipStatus = $payfipStatus;

        return $this;
    }
    /**
     * Get payfipStatus
     *
     * @return string
     */
    public function getPayfipStatus()
    {
        return $this->payfipStatus;
    }
    /**
     * Add stageManager
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $stageManager
     *
     * @return BillingExportSetting
     */
    public function addStageManager(\AppBundle\Entity\AccessAndFunction\Access $stageManager)
    {
        $this->stageManagers[] = $stageManager;

        return $this;
    }
    /**
     * Remove stageManager
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $stageManager
     */
    public function removeStageManager(\AppBundle\Entity\AccessAndFunction\Access $stageManager)
    {
        $this->stageManagers->removeElement($stageManager);
    }
    /**
     * Get stageManagers
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getStageManagers()
    {
        return $this->stageManagers;
    }
    /**
     * Set rentalBudgetaryArticleCode
     *
     * @param string $rentalBudgetaryArticleCode
     *
     * @return BillingExportSetting
     */
    public function setRentalBudgetaryArticleCode($rentalBudgetaryArticleCode)
    {
        $this->rentalBudgetaryArticleCode = $rentalBudgetaryArticleCode;

        return $this;
    }
    /**
     * Get rentalBudgetaryArticleCode
     *
     * @return string
     */
    public function getRentalBudgetaryArticleCode()
    {
        return $this->rentalBudgetaryArticleCode;
    }
    /**
     * Set payfipSeveralPayments
     *
     * @param boolean $payfipSeveralPayments
     *
     * @return BillingExportSetting
     */
    public function setPayfipSeveralPayments($payfipSeveralPayments)
    {
        $this->payfipSeveralPayments = $payfipSeveralPayments;

        return $this;
    }
    /**
     * Get payfipSeveralPayments
     *
     * @return boolean
     */
    public function getPayfipSeveralPayments()
    {
        return $this->payfipSeveralPayments;
    }
    /**
     * Set lotReference
     *
     * @param string $lotReference
     *
     * @return BillingExportSetting
     */
    public function setLotReference($lotReference)
    {
        $this->lotReference = $lotReference;

        return $this;
    }
    /**
     * Get lotReference
     *
     * @return string
     */
    public function getLotReference()
    {
        return $this->lotReference;
    }
    /**
     * Set directDebitCode
     *
     * @param string $directDebitCode
     *
     * @return BillingExportSetting
     */
    public function setDirectDebitCode($directDebitCode)
    {
        $this->directDebitCode = $directDebitCode;

        return $this;
    }
    /**
     * Get directDebitCode
     *
     * @return string
     */
    public function getDirectDebitCode()
    {
        return $this->directDebitCode;
    }
    /**
     * Set functionalCode
     *
     * @param string $functionalCode
     *
     * @return BillingExportSetting
     */
    public function setFunctionalCode($functionalCode)
    {
        $this->functionalCode = $functionalCode;

        return $this;
    }
    /**
     * Get functionalCode
     *
     * @return string
     */
    public function getFunctionalCode()
    {
        return $this->functionalCode;
    }
    /**
     * Set antenna
     *
     * @param string $antenna
     *
     * @return BillingExportSetting
     */
    public function setAntenna($antenna)
    {
        $this->antenna = $antenna;

        return $this;
    }
    /**
     * Get antenna
     *
     * @return string
     */
    public function getAntenna()
    {
        return $this->antenna;
    }
    /**
     * Set teneurName
     *
     * @param string $teneurName
     *
     * @return BillingExportSetting
     */
    public function setTeneurName($teneurName)
    {
        $this->teneurName = $teneurName;

        return $this;
    }
    /**
     * Get teneurName
     *
     * @return string
     */
    public function getTeneurName()
    {
        return $this->teneurName;
    }
    /**
     * Set teneur
     *
     * @param $teneur
     */
    public function setTeneur($teneur)
    {
        $this->teneur = $teneur;

        return $this;
    }
    /**
     * Get teneur
     *
     * @return
     */
    public function getTeneur()
    {
        return $this->teneur;
    }
}
