src/Entity/Rangements/CommandeCaisse.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Rangements;
  3. use App\Entity\GestionComerciale\Commande;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Doctrine\ORM\Mapping\Index;
  9. /**
  10.  * CommandeCaisse
  11.  *
  12.  * @ORM\Table("rangement__commande_caisse")
  13.  * @ORM\Entity(repositoryClass="App\Repository\Rangements\CommandeCaisseRepository")
  14.  */
  15. class CommandeCaisse
  16. {
  17.     /**
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\Rangements\Caisse")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $caisse;
  29.     
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande",inversedBy="commandeCaisses")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private $commande;    
  35.     /**
  36.      * @ORM\Column(name="date", type="datetime",nullable=true)
  37.      */
  38.     private $date;
  39.     
  40.     
  41.     public function __construct(){
  42.         $this->date = new Datetime();
  43.     }
  44.     public function getId(): int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function setDate(?DateTime $date): CommandeCaisse
  49.     {
  50.         $this->date $date;
  51.         return $this;
  52.     }
  53.     public function getDate(): ?DateTime
  54.     {
  55.         return $this->date;
  56.     }
  57.     public function setCaisse(?Caisse $caisse): CommandeCaisse
  58.     {
  59.         $this->caisse $caisse;
  60.         return $this;
  61.     }
  62.     public function getCaisse(): ?Caisse
  63.     {
  64.         return $this->caisse;
  65.     }
  66.     public function setCommande(?Commande $commande): CommandeCaisse
  67.     {
  68.         $this->commande $commande;
  69.         return $this;
  70.     }
  71.     public function getCommande(): ?Commande
  72.     {
  73.         return $this->commande;
  74.     }
  75. }