src/Entity/Clients/ClientCategorie.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Clients;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * ClientCategorie
  9.  *
  10.  * @ORM\Table("client__client_categorie")
  11.  * @ORM\Entity(repositoryClass="App\Repository\Clients\ClientCategorieRepository")
  12.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  13.  */
  14. class ClientCategorie
  15. {
  16.     /**
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Categorie", inversedBy="clientCategorie")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $categorie;
  28.     
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", inversedBy="clientCategorie")
  31.      * @ORM\JoinColumn(nullable=false)
  32.      */
  33.     private $client;
  34.     
  35.      /**
  36.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  37.      * @Gedmo\Timestampable(on="update")
  38.      */
  39.     private $dateMaj;
  40.     /**
  41.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  42.      */
  43.     private $dateSuppression;
  44.     /**
  45.      * @ORM\Column(name="date", type="datetime", nullable=true)
  46.      */
  47.     private $date;
  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): ClientCategorie
  57.     {
  58.         $this->date $date;
  59.         return $this;
  60.     }
  61.     public function getDate(): ?DateTime
  62.     {
  63.         return $this->date;
  64.     }
  65.     public function setCategorie(?Categorie $categorie): ClientCategorie
  66.     {
  67.         $this->categorie $categorie;
  68.         return $this;
  69.     }
  70.     public function getCategorie(): ?Categorie
  71.     {
  72.         return $this->categorie;
  73.     }
  74.     public function setClient(?Client $client): ClientCategorie
  75.     {
  76.         $this->client $client;
  77.         return $this;
  78.     }
  79.     public function getClient(): ?Client
  80.     {
  81.         return $this->client;
  82.     }
  83.     public function setDateMaj(?DateTime $dateMaj): ClientCategorie
  84.     {
  85.         $this->dateMaj $dateMaj;
  86.         return $this;
  87.     }
  88.     public function getDateMaj(): ?DateTime
  89.     {
  90.         return $this->dateMaj;
  91.     }
  92.     public function setDateSuppression(?DateTime $dateSuppression): ClientCategorie
  93.     {
  94.         $this->dateSuppression $dateSuppression;
  95.         return $this;
  96.     }
  97.     public function getDateSuppression(): ?DateTime
  98.     {
  99.         return $this->dateSuppression;
  100.     }
  101. }