src/Entity/CompagnyInfo.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Symfony\Component\HttpFoundation\File\UploadedFile;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\CompagnyInfoRepository")
  10.  */
  11. class CompagnyInfo
  12. {
  13.     /**
  14.      * @ORM\Id()
  15.      * @ORM\GeneratedValue()
  16.      * @ORM\Column(type="integer")
  17.      * @Groups("compagny")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      * @Groups("compagny")
  23.      */
  24.     private $nameCompagny;
  25.     /**
  26.      * @ORM\Column(type="date")
  27.      */
  28.     private $birthdayCompagny;
  29.     /**
  30.      * @ORM\Column(type="text")
  31.      */
  32.     private $adressCompagny;
  33.     /**
  34.      * @ORM\Column(type="integer")
  35.      */
  36.     private $postalCodeCompagny;
  37.     /**
  38.      * @ORM\Column(type="string", length=255)
  39.      */
  40.     private $cityCompagny;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      */
  44.     private $countryCompagny;
  45.     
  46.     /**
  47.      * @ORM\Column(type="text")
  48.      */
  49.     private $descriptionCompagny;
  50.     
  51.     /**
  52.      * @ORM\OneToOne(targetEntity="App\Entity\User", cascade={"persist", "remove"})
  53.      * @Groups("compagny")
  54.      */
  55.     private $user;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\DomainActivity", inversedBy="compagnyInfos")
  58.      */
  59.     private $domainActivity;
  60.     /**
  61.      * @ORM\OneToOne(targetEntity="App\Entity\ProfilPicture", cascade={"persist", "remove"})
  62.      */
  63.     private $pictureProfilCompagny;
  64.     /**
  65.      * @ORM\ManyToOne(targetEntity="App\Entity\Job", inversedBy="compagnyInfos")
  66.      */
  67.     private $job;
  68.     /**
  69.      * @ORM\Column(type="string", length=255)
  70.      */
  71.     private $identificationNumberCompagny;
  72.     /**
  73.      * @ORM\ManyToOne(targetEntity=Department::class, inversedBy="compagnyInfos")
  74.      */
  75.     private $departmentCompagny;
  76.     /**
  77.      * @ORM\OneToMany(targetEntity=ServicePrice::class, mappedBy="compagny")
  78.      */
  79.     private $servicePrices;
  80.     /**
  81.      * @ORM\Column(type="decimal", precision=10, scale=0, nullable=true)
  82.      */
  83.     private $firstPrice;
  84.     /**
  85.      * @ORM\ManyToMany(targetEntity=PackageCompagny::class, mappedBy="compagny", cascade={"persist"})
  86.      */
  87.     private $packageCompagnies;
  88.     /**
  89.      * @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="idCompagny")
  90.      */
  91.     private $shoppingCarts;
  92.     /**
  93.      * @ORM\Column(type="string", length=255, nullable=true)
  94.      */
  95.     private $RCS;
  96.     /**
  97.      * @ORM\OneToMany(targetEntity=Billing::class, mappedBy="idProvider")
  98.      */
  99.     private $billings;
  100.     /**
  101.      * @ORM\Column(type="decimal", precision=10, scale=4, nullable=true, options={"default" : 0.1000})
  102.      * @Groups("compagny")
  103.      */
  104.     private $pourcentage_fees;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $legalType;
  109.     /**
  110.      * @ORM\Column(type="decimal", precision=10, scale=0, nullable=true, options={"default" : 0})
  111.      */
  112.     private $amountLimitMinDeposit;
  113.     /**
  114.      * @ORM\Column(type="decimal", precision=10, scale=4, nullable=true)
  115.      */
  116.     private $pourcentageDeposit;
  117.     /**
  118.      * @ORM\Column(type="json", nullable=true)
  119.      */
  120.     private $acceptedDeposit = [];
  121.     /**
  122.      * @ORM\OneToMany(targetEntity=Refund::class, mappedBy="provider")
  123.      */
  124.     private $refunds;
  125.     /**
  126.      * @ORM\ManyToMany(targetEntity=Job::class, inversedBy="supplyCompagnyInfos")
  127.      */
  128.     private $supplyJobs;
  129.     /**
  130.      * @ORM\ManyToMany(targetEntity=DomainActivity::class, inversedBy="supplyCompagnyInfos")
  131.      */
  132.     private $supplyDomains;
  133.     public function __construct()
  134.     {
  135.         $this->packageCompagnies = new ArrayCollection();
  136.         $this->shoppingCarts = new ArrayCollection();
  137.         $this->billings = new ArrayCollection();
  138.         $this->servicePrices = new ArrayCollection();
  139.         $this->refunds = new ArrayCollection();
  140.         $this->supplyJobs = new ArrayCollection();
  141.         $this->supplyDomains = new ArrayCollection();
  142.     }
  143.     
  144.    
  145.     
  146.         
  147.     public function getId(): ?int
  148.     {
  149.         return $this->id;
  150.     }
  151.     public function getNameCompagny(): ?string
  152.     {
  153.         return $this->nameCompagny;
  154.     }
  155.     public function setNameCompagny(string $nameCompagny): self
  156.     {
  157.         $this->nameCompagny $nameCompagny;
  158.         return $this;
  159.     }
  160.     public function getBirthdayCompagny(): ?\DateTimeInterface
  161.     {
  162.         return $this->birthdayCompagny;
  163.     }
  164.     public function setBirthdayCompagny(\DateTimeInterface $birthdayCompagny): self
  165.     {
  166.         $this->birthdayCompagny $birthdayCompagny;
  167.         return $this;
  168.     }
  169.     public function getAdressCompagny(): ?string
  170.     {
  171.         return $this->adressCompagny;
  172.     }
  173.     public function setAdressCompagny(string $adressCompagny): self
  174.     {
  175.         $this->adressCompagny $adressCompagny;
  176.         return $this;
  177.     }
  178.     public function getPostalCodeCompagny(): ?int
  179.     {
  180.         return $this->postalCodeCompagny;
  181.     }
  182.     public function setPostalCodeCompagny(int $postalCodeCompagny): self
  183.     {
  184.         $this->postalCodeCompagny $postalCodeCompagny;
  185.         return $this;
  186.     }
  187.     public function getCityCompagny(): ?string
  188.     {
  189.         return $this->cityCompagny;
  190.     }
  191.     public function setCityCompagny(string $cityCompagny): self
  192.     {
  193.         $this->cityCompagny $cityCompagny;
  194.         return $this;
  195.     }
  196.     public function getCountryCompagny(): ?string
  197.     {
  198.         return $this->countryCompagny;
  199.     }
  200.     public function setCountryCompagny(string $countryCompagny): self
  201.     {
  202.         $this->countryCompagny $countryCompagny;
  203.         return $this;
  204.     }
  205.     public function getDescriptionCompagny(): ?string
  206.     {
  207.         return $this->descriptionCompagny;
  208.     }
  209.     public function setDescriptionCompagny(string $descriptionCompagny): self
  210.     {
  211.         $this->descriptionCompagny $descriptionCompagny;
  212.         return $this;
  213.     }
  214.     public function getUser(): ?User
  215.     {
  216.         return $this->user;
  217.     }
  218.     public function setUser(?User $user): self
  219.     {
  220.         $this->user $user;
  221.         return $this;
  222.     }
  223.     public function getDomainActivity(): ?DomainActivity
  224.     {
  225.         return $this->domainActivity;
  226.     }
  227.     public function setDomainActivity(?DomainActivity $domainActivity): self
  228.     {
  229.         $this->domainActivity $domainActivity;
  230.         return $this;
  231.     }
  232.     public function getPictureProfilCompagny(): ?ProfilPicture
  233.     {
  234.         return $this->pictureProfilCompagny;
  235.     }
  236.     public function setPictureProfilCompagny(?ProfilPicture $pictureProfilCompagny): self
  237.     {
  238.         $this->pictureProfilCompagny $pictureProfilCompagny;
  239.         return $this;
  240.     }
  241.     public function getJob(): ?Job
  242.     {
  243.         return $this->job;
  244.     }
  245.     public function setJob(?Job $job): self
  246.     {
  247.         $this->job $job;
  248.         return $this;
  249.     }
  250.     public function getIdentificationNumberCompagny(): ?string
  251.     {
  252.         return $this->identificationNumberCompagny;
  253.     }
  254.     public function setIdentificationNumberCompagny(string $identificationNumberCompagny): self
  255.     {
  256.         $this->identificationNumberCompagny $identificationNumberCompagny;
  257.         return $this;
  258.     }
  259.     public function getDepartmentCompagny(): ?Department
  260.     {
  261.         return $this->departmentCompagny;
  262.     }
  263.     public function setDepartmentCompagny(?Department $departmentCompagny): self
  264.     {
  265.         $this->departmentCompagny $departmentCompagny;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection|ServicePrice[]
  270.      */
  271.     public function getServicePrices(): Collection
  272.     {
  273.         return $this->servicePrices;
  274.     }
  275.     public function addServicePrice(ServicePrice $servicePrice): self
  276.     {
  277.         if (!$this->servicePrices->contains($servicePrice)) {
  278.             $this->servicePrices[] = $servicePrice;
  279.             $servicePrice->setCompagny($this);
  280.         }
  281.         return $this;
  282.     }
  283.     public function removeServicePrice(ServicePrice $servicePrice): self
  284.     {
  285.         if ($this->servicePrices->contains($servicePrice)) {
  286.             $this->servicePrices->removeElement($servicePrice);
  287.             // set the owning side to null (unless already changed)
  288.             if ($servicePrice->getCompagny() === $this) {
  289.                 $servicePrice->setCompagny(null);
  290.             }
  291.         }
  292.         return $this;
  293.     }
  294.     public function getFirstPrice(): ?string
  295.     {
  296.         return $this->firstPrice;
  297.     }
  298.     public function setFirstPrice(string $firstPrice): self
  299.     {
  300.         $this->firstPrice $firstPrice;
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return Collection|PackageCompagny[]
  305.      */
  306.     public function getPackageCompagnies(): Collection
  307.     {
  308.         return $this->packageCompagnies;
  309.     }
  310.     public function addPackageCompagny(PackageCompagny $packageCompagny): self
  311.     {
  312.         if (!$this->packageCompagnies->contains($packageCompagny)) {
  313.             $this->packageCompagnies[] = $packageCompagny;
  314.             $packageCompagny->addCompagny($this);
  315.         }
  316.         return $this;
  317.     }
  318.     public function removePackageCompagny(PackageCompagny $packageCompagny): self
  319.     {
  320.         if ($this->packageCompagnies->contains($packageCompagny)) {
  321.             $this->packageCompagnies->removeElement($packageCompagny);
  322.             $packageCompagny->removeCompagny($this);
  323.         }
  324.         return $this;
  325.     }
  326.     /**
  327.      * @return Collection|ShoppingCart[]
  328.      */
  329.     public function getShoppingCarts(): Collection
  330.     {
  331.         return $this->shoppingCarts;
  332.     }
  333.     public function addShoppingCart(ShoppingCart $shoppingCart): self
  334.     {
  335.         if (!$this->shoppingCarts->contains($shoppingCart)) {
  336.             $this->shoppingCarts[] = $shoppingCart;
  337.             $shoppingCart->setIdCompagny($this);
  338.         }
  339.         return $this;
  340.     }
  341.     public function removeShoppingCart(ShoppingCart $shoppingCart): self
  342.     {
  343.         if ($this->shoppingCarts->removeElement($shoppingCart)) {
  344.             // set the owning side to null (unless already changed)
  345.             if ($shoppingCart->getIdCompagny() === $this) {
  346.                 $shoppingCart->setIdCompagny(null);
  347.             }
  348.         }
  349.         return $this;
  350.     }
  351.     public function getRCS(): ?string
  352.     {
  353.         return $this->RCS;
  354.     }
  355.     public function setRCS(?string $RCS): self
  356.     {
  357.         $this->RCS $RCS;
  358.         return $this;
  359.     }
  360.     public function getLegalType()
  361.     {
  362.         return $this->legalType;
  363.     }
  364.     public function setLegalType(?string $legalType): self
  365.     {
  366.         $this->legalType $legalType;
  367.         return $this;
  368.     }
  369.     /**
  370.      * @return Collection|Billing[]
  371.      */
  372.     public function getBillings(): Collection
  373.     {
  374.         return $this->billings;
  375.     }
  376.     public function addBilling(Billing $billing): self
  377.     {
  378.         if (!$this->billings->contains($billing)) {
  379.             $this->billings[] = $billing;
  380.             $billing->setIdProvider($this);
  381.         }
  382.         return $this;
  383.     }
  384.     public function removeBilling(Billing $billing): self
  385.     {
  386.         if ($this->billings->removeElement($billing)) {
  387.             // set the owning side to null (unless already changed)
  388.             if ($billing->getIdProvider() === $this) {
  389.                 $billing->setIdProvider(null);
  390.             }
  391.         }
  392.         return $this;
  393.     }
  394.     public function getPourcentageFees(): ?string
  395.     {
  396.         return $this->pourcentage_fees;
  397.     }
  398.     public function setPourcentageFees(?string $pourcentage_fees): self
  399.     {
  400.         $this->pourcentage_fees $pourcentage_fees/100;
  401.         return $this;
  402.     }
  403.     
  404.     public function getAmountLimitMinDeposit(): ?string
  405.     {
  406.         return $this->amountLimitMinDeposit;
  407.     }
  408.     public function setAmountLimitMinDeposit(?string $amountLimitMinDeposit): self
  409.     {
  410.         $this->amountLimitMinDeposit $amountLimitMinDeposit;
  411.         return $this;
  412.     }
  413.     public function getPourcentageDeposit(): ?string
  414.     {
  415.         return $this->pourcentageDeposit;
  416.     }
  417.     public function setPourcentageDeposit(?string $pourcentageDeposit): self
  418.     {
  419.         $this->pourcentageDeposit $pourcentageDeposit;
  420.         return $this;
  421.     }
  422.     public function getAcceptedDeposit(): ?array
  423.     {
  424.         return $this->acceptedDeposit;
  425.     }
  426.     public function setAcceptedDeposit(?array $acceptedDeposit): self
  427.     {
  428.         $this->acceptedDeposit $acceptedDeposit;
  429.         return $this;
  430.     }
  431.     /**
  432.      * @return Collection|Refund[]
  433.      */
  434.     public function getRefunds(): Collection
  435.     {
  436.         return $this->refunds;
  437.     }
  438.     public function addRefund(Refund $refund): self
  439.     {
  440.         if (!$this->refunds->contains($refund)) {
  441.             $this->refunds[] = $refund;
  442.             $refund->setProvider($this);
  443.         }
  444.         return $this;
  445.     }
  446.     public function removeRefund(Refund $refund): self
  447.     {
  448.         if ($this->refunds->removeElement($refund)) {
  449.             // set the owning side to null (unless already changed)
  450.             if ($refund->getProvider() === $this) {
  451.                 $refund->setProvider(null);
  452.             }
  453.         }
  454.         return $this;
  455.     }
  456.     /**
  457.      * @return Collection|Job[]
  458.      */
  459.     public function getSupplyJobs(): Collection
  460.     {
  461.         return $this->supplyJobs;
  462.     }
  463.     public function addSupplyJob(Job $supplyJob): self
  464.     {
  465.         if (!$this->supplyJobs->contains($supplyJob)) {
  466.             $this->supplyJobs[] = $supplyJob;
  467.         }
  468.         return $this;
  469.     }
  470.     public function removeSupplyJob(Job $supplyJob): self
  471.     {
  472.         $this->supplyJobs->removeElement($supplyJob);
  473.         return $this;
  474.     }
  475.     /**
  476.      * @return Collection|DomainActivity[]
  477.      */
  478.     public function getSupplyDomains(): Collection
  479.     {
  480.         return $this->supplyDomains;
  481.     }
  482.     public function addSupplyDomain(DomainActivity $supplyDomain): self
  483.     {
  484.         if (!$this->supplyDomains->contains($supplyDomain)) {
  485.             $this->supplyDomains[] = $supplyDomain;
  486.         }
  487.         return $this;
  488.     }
  489.     public function removeSupplyDomain(DomainActivity $supplyDomain): self
  490.     {
  491.         $this->supplyDomains->removeElement($supplyDomain);
  492.         return $this;
  493.     }
  494.     
  495.     
  496. }