src/Entity/GestionComerciale/Facture.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GestionComerciale;
  3. use App\Entity\Utilisateur\Utilisateur;
  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 App\Annotations\SecuredEntity;
  9. /**
  10.  * Facture
  11.  *
  12.  * @ORM\Table("commerciale__facture")
  13.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\FactureRepository")
  14.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  15.  * @SecuredEntity(name="Facture client", group="VENTES")
  16.  */
  17. class Facture
  18. {
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="factures")
  27.      * @ORM\JoinColumn(nullable=true)
  28.      */
  29.     private $utilisateur;
  30.     /**
  31.      * @ORM\Column(name="date", type="datetime", nullable=true)
  32.      */
  33.     private $date;
  34.     /**
  35.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  36.      * @Gedmo\Timestampable(on="update")
  37.      */
  38.     private $dateMaj;
  39.     /**
  40.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  41.      */
  42.     private $dateSuppression;
  43.     /**
  44.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  45.      */
  46.     private $reference;
  47.     
  48.     public function __construct()
  49.     {
  50.         $this->date = new Datetime();
  51.     }
  52.     public function getId(): int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function setDate(?DateTime $date): Facture
  57.     {
  58.         $this->date $date;
  59.         return $this;
  60.     }
  61.     public function getDate(): ?DateTime
  62.     {
  63.         return $this->date;
  64.     }
  65.     public function setDateMaj(?DateTime $dateMaj): Facture
  66.     {
  67.         $this->dateMaj $dateMaj;
  68.         return $this;
  69.     }
  70.     public function getDateMaj(): ?DateTime
  71.     {
  72.         return $this->dateMaj;
  73.     }
  74.     public function setDateSuppression(?DateTime $dateSuppression): Facture
  75.     {
  76.         $this->dateSuppression $dateSuppression;
  77.         return $this;
  78.     }
  79.     public function getDateSuppression(): ?DateTime
  80.     {
  81.         return $this->dateSuppression;
  82.     }
  83.     public function setReference(?string $reference): Facture
  84.     {
  85.         $this->reference $reference;
  86.         return $this;
  87.     }
  88.     public function getReference(): ?string
  89.     {
  90.         return $this->reference;
  91.     }
  92.     public function setUtilisateur(?Utilisateur $utilisateur): Facture
  93.     {
  94.         $this->utilisateur $utilisateur;
  95.         return $this;
  96.     }
  97.     public function getUtilisateur(): ?Utilisateur
  98.     {
  99.         return $this->utilisateur;
  100.     }
  101. }