src/Entity/GestionComerciale/DelaiPaiement.php line 19

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.  * DelaiPaiement
  11.  *
  12.  * @ORM\Table("commerciale__delai_paiement")
  13.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\DelaiPaiementRepository")
  14.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  15.  * @SecuredEntity(name="Délai de Paiement", group="REGLAGES")
  16.  */
  17. class DelaiPaiement
  18. {
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\Column(name="date", type="datetime", nullable=true)
  27.      */
  28.     private $date;
  29.     /**
  30.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  31.      * @Assert\NotBlank(message="Libellé obligatoire")
  32.      */
  33.     private $libelle;
  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\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="clients")
  45.      * @ORM\JoinColumn(nullable=true)
  46.      */
  47.     private $utilisateur;
  48.     /**
  49.      * @var boolean
  50.      * @ORM\Column(name="fin_mois", type="boolean", options={"default":false}, nullable=true)
  51.      */
  52.     protected $finMois;
  53.     /**
  54.      *
  55.      * @ORM\Column(name="delai", type="integer", nullable=true)
  56.      */
  57.     private $delai;
  58.     /**
  59.      *
  60.      * @ORM\Column(name="jour_echeance", type="integer", nullable=true)
  61.      */
  62.     private $jourEcheance;
  63.     public function __construct()
  64.     {
  65.         $this->date = new Datetime();
  66.         $this->modifiable true;
  67.     }
  68.     public function getId(): int
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function setDate(?DateTime $date): DelaiPaiement
  73.     {
  74.         $this->date $date;
  75.         return $this;
  76.     }
  77.     public function getDate(): ?DateTime
  78.     {
  79.         return $this->date;
  80.     }
  81.     public function setLibelle(?string $libelle): DelaiPaiement
  82.     {
  83.         $this->libelle $libelle;
  84.         return $this;
  85.     }
  86.     public function getLibelle(): ?string
  87.     {
  88.         return $this->libelle;
  89.     }
  90.     public function setDateMaj(?DateTime $dateMaj): DelaiPaiement
  91.     {
  92.         $this->dateMaj $dateMaj;
  93.         return $this;
  94.     }
  95.     public function getDateMaj(): ?DateTime
  96.     {
  97.         return $this->dateMaj;
  98.     }
  99.     public function setDateSuppression(?DateTime $dateSuppression): DelaiPaiement
  100.     {
  101.         $this->dateSuppression $dateSuppression;
  102.         return $this;
  103.     }
  104.     public function getDateSuppression(): ?DateTime
  105.     {
  106.         return $this->dateSuppression;
  107.     }
  108.     public function setUtilisateur(?Utilisateur $utilisateur): DelaiPaiement
  109.     {
  110.         $this->utilisateur $utilisateur;
  111.         return $this;
  112.     }
  113.     public function getUtilisateur(): ?Utilisateur
  114.     {
  115.         return $this->utilisateur;
  116.     }
  117.     
  118.     public function __toString() {
  119.         return $this->libelle;
  120.     }
  121.     public function isFinMois(): ?bool
  122.     {
  123.         return $this->finMois;
  124.     }
  125.     public function setFinMois(?bool $finMois): self
  126.     {
  127.         $this->finMois $finMois;
  128.         return $this;
  129.     }
  130.     public function getDelai(): ?int
  131.     {
  132.         return $this->delai;
  133.     }
  134.     public function setDelai(?int $delai): self
  135.     {
  136.         $this->delai $delai;
  137.         return $this;
  138.     }
  139.     public function getJourEcheance(): ?int
  140.     {
  141.         return $this->jourEcheance;
  142.     }
  143.     public function setJourEcheance(?int $jourEcheance): self
  144.     {
  145.         $this->jourEcheance $jourEcheance;
  146.         return $this;
  147.     }
  148.     
  149. }