src/Entity/Cart.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Cart
  7.  *
  8.  * @ORM\Table(name="cart", indexes={@ORM\Index(name="fk_sejou_idx", columns={"idsejour"})})
  9.  * @ORM\Entity(repositoryClass="App\Repository\CartRepository")
  10.  */
  11. class Cart
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var int|null
  23.      *
  24.      * @ORM\Column(name="nbconsomateur", type="integer", nullable=true)
  25.      */
  26.     private $nbconsomateur;
  27.     /**
  28.      * @var int|null
  29.      *
  30.      * @ORM\Column(name="nbpartenaire", type="integer", nullable=true)
  31.      */
  32.     private $nbpartenaire;
  33.     /**
  34.      * @var int|null
  35.      *
  36.      * @ORM\Column(name="nbecole", type="integer", nullable=true)
  37.      */
  38.     private $nbecole;
  39.     /**
  40.      * @var \DateTime|null
  41.      *
  42.      * @ORM\Column(name="date", type="date", nullable=true)
  43.      */
  44.     private $date;
  45.     /**
  46.      * @var \Sejour
  47.      *
  48.      * @ORM\ManyToOne(targetEntity="Sejour")
  49.      * @ORM\JoinColumns({
  50.      *   @ORM\JoinColumn(name="idsejour", referencedColumnName="id")
  51.      * })
  52.      */
  53.     private $idsejour;
  54.     /**
  55.      * @ORM\OneToMany(targetEntity="App\Entity\Position", mappedBy="idcart")
  56.      */
  57.     private $positions;
  58.     public function __construct()
  59.     {
  60.         $this->positions = new ArrayCollection();}
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getNbconsomateur(): ?int
  66.     {
  67.         return $this->nbconsomateur;
  68.     }
  69.     public function setNbconsomateur(?int $nbconsomateur): self
  70.     {
  71.         $this->nbconsomateur $nbconsomateur;
  72.         return $this;
  73.     }
  74.     public function getNbpartenaire(): ?int
  75.     {
  76.         return $this->nbpartenaire;
  77.     }
  78.     public function setNbpartenaire(?int $nbpartenaire): self
  79.     {
  80.         $this->nbpartenaire $nbpartenaire;
  81.         return $this;
  82.     }
  83.     public function getNbecole(): ?int
  84.     {
  85.         return $this->nbecole;
  86.     }
  87.     public function setNbecole(?int $nbecole): self
  88.     {
  89.         $this->nbecole $nbecole;
  90.         return $this;
  91.     }
  92.     public function getDate(): ?\DateTimeInterface
  93.     {
  94.         return $this->date;
  95.     }
  96.     public function setDate(?\DateTimeInterface $date): self
  97.     {
  98.         $this->date $date;
  99.         return $this;
  100.     }
  101.     public function getIdsejour(): ?Sejour
  102.     {
  103.         return $this->idsejour;
  104.     }
  105.     public function setIdsejour(?Sejour $idsejour): self
  106.     {
  107.         $this->idsejour $idsejour;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return mixed
  112.      */
  113.     public function getPositions()
  114.     {
  115.         return $this->positions;
  116.     }
  117.     /**
  118.      * @param mixed $positions
  119.      */
  120.     public function setPositions($positions): void
  121.     {
  122.         $this->positions $positions;
  123.     }
  124. }