src/Entity/Livraison.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LivraisonRepository;
  4. use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=LivraisonRepository::class)
  8.  * @Auditable
  9.  */
  10. class Livraison
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private ?string $firstName;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private ?string $lastName;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private ?string $postName;
  30.     /**
  31.      * @ORM\Column(type="datetime_immutable")
  32.      */
  33.     private ?\DateTimeImmutable $createdAt;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="livraisons")
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $createdBy;
  39.     /**
  40.      * @ORM\Column(type="integer", length=1)
  41.      */
  42.     private ?int $status;
  43.     /**
  44.      * @ORM\Column(type="string", length=255)
  45.      */
  46.     private ?string $phoneNumber;
  47.     /**
  48.      * @ORM\Column(type="string", length=255)
  49.      */
  50.     private $deliveryAddress;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=Pcode::class)
  53.      * @ORM\JoinColumn(nullable=false)
  54.      */
  55.     private $ville;
  56.     /**
  57.      * @ORM\Column(type="boolean")
  58.      */
  59.     private $isDeleted;
  60.     /**
  61.      * @ORM\ManyToOne(targetEntity=Folder::class)
  62.      * @ORM\JoinColumn(nullable=false)
  63.      */
  64.     private $folder;
  65.     /**
  66.      * @ORM\Column(type="datetime_immutable", nullable=true)
  67.      */
  68.     private $deliveryAt;
  69.     /**
  70.      * @ORM\Column(type="string", length=255)
  71.      */
  72.     private $deliveryNumber;
  73.     /**
  74.      * @ORM\Column(type="string", length=255, nullable=true)
  75.      */
  76.     private $reference;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      */
  80.     private $livrera;
  81.     /**
  82.      * @ORM\Column(type="datetime")
  83.      */
  84.     private $deliveryLimitDate;
  85.     /**
  86.      */
  87.     public function __construct()
  88.     {
  89.         $this->createdAt = new \DateTimeImmutable();
  90.         $this->deliveryLimitDate = (new \DateTimeImmutable())->add(new \DateInterval('P2D'));
  91.     }
  92.     public function getId(): ?int
  93.     {
  94.         return $this->id;
  95.     }
  96.     public function getFirstName(): ?string
  97.     {
  98.         return $this->firstName;
  99.     }
  100.     public function setFirstName(string $firstName): self
  101.     {
  102.         $this->firstName $firstName;
  103.         return $this;
  104.     }
  105.     public function getLastName(): ?string
  106.     {
  107.         return $this->lastName;
  108.     }
  109.     public function setLastName(string $lastName): self
  110.     {
  111.         $this->lastName $lastName;
  112.         return $this;
  113.     }
  114.     public function getPostName(): ?string
  115.     {
  116.         return $this->postName;
  117.     }
  118.     public function setPostName(string $postName): self
  119.     {
  120.         $this->postName $postName;
  121.         return $this;
  122.     }
  123.     public function getCreatedAt(): ?\DateTimeImmutable
  124.     {
  125.         return $this->createdAt;
  126.     }
  127.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  128.     {
  129.         $this->createdAt $createdAt;
  130.         return $this;
  131.     }
  132.     public function getCreatedBy(): ?Users
  133.     {
  134.         return $this->createdBy;
  135.     }
  136.     public function setCreatedBy(?Users $createdBy): self
  137.     {
  138.         $this->createdBy $createdBy;
  139.         return $this;
  140.     }
  141.     public function getStatus(): ?int
  142.     {
  143.         return $this->status;
  144.     }
  145.     public function setStatus(int $status): self
  146.     {
  147.         $this->status $status;
  148.         return $this;
  149.     }
  150.     public function getPhoneNumber(): ?string
  151.     {
  152.         return $this->phoneNumber;
  153.     }
  154.     public function setPhoneNumber(string $phoneNumber): self
  155.     {
  156.         $this->phoneNumber $phoneNumber;
  157.         return $this;
  158.     }
  159.     public function getDeliveryAddress(): ?string
  160.     {
  161.         return $this->deliveryAddress;
  162.     }
  163.     public function setDeliveryAddress(string $deliveryAddress): self
  164.     {
  165.         $this->deliveryAddress $deliveryAddress;
  166.         return $this;
  167.     }
  168.     public function getVille(): ?Pcode
  169.     {
  170.         return $this->ville;
  171.     }
  172.     public function setVille(?Pcode $ville): self
  173.     {
  174.         $this->ville $ville;
  175.         return $this;
  176.     }
  177.     public function isIsDeleted(): ?bool
  178.     {
  179.         return $this->isDeleted;
  180.     }
  181.     public function setIsDeleted(bool $isDeleted): self
  182.     {
  183.         $this->isDeleted $isDeleted;
  184.         return $this;
  185.     }
  186.     public function getFolder(): ?Folder
  187.     {
  188.         return $this->folder;
  189.     }
  190.     public function setFolder(?Folder $folder): self
  191.     {
  192.         $this->folder $folder;
  193.         return $this;
  194.     }
  195.     public function getDeliveryAt(): ?\DateTimeImmutable
  196.     {
  197.         return $this->deliveryAt;
  198.     }
  199.     public function setDeliveryAt(?\DateTimeImmutable $deliveryAt): self
  200.     {
  201.         $this->deliveryAt $deliveryAt;
  202.         return $this;
  203.     }
  204.     public function getDeliveryNumber(): ?string
  205.     {
  206.         return $this->deliveryNumber;
  207.     }
  208.     public function setDeliveryNumber(string $deliveryNumber): self
  209.     {
  210.         $this->deliveryNumber $deliveryNumber;
  211.         return $this;
  212.     }
  213.     public function getReference(): ?string
  214.     {
  215.         return $this->reference;
  216.     }
  217.     public function setReference(?string $reference): self
  218.     {
  219.         $this->reference $reference;
  220.         return $this;
  221.     }
  222.     public function getLivrera(): ?string
  223.     {
  224.         return $this->livrera;
  225.     }
  226.     public function setLivrera(?string $livrera): self
  227.     {
  228.         $this->livrera $livrera;
  229.         return $this;
  230.     }
  231.     public function getDeliveryLimitDate(): ?\DateTimeInterface
  232.     {
  233.         return $this->deliveryLimitDate;
  234.     }
  235.     public function setDeliveryLimitDate(\DateTimeInterface $deliveryLimitDate): self
  236.     {
  237.         $this->deliveryLimitDate $deliveryLimitDate;
  238.         return $this;
  239.     }
  240. }