src/Entity/Cvs/CandidatesHasStatistics.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Cvs;
  3. use App\Entity\Core\Users;
  4. use App\Entity\Core\Agencies;
  5. use Doctrine\DBAL\Types\Types;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * Candidates has statistics
  11.  *
  12.  * @ORM\Table("cvs_candidates_has_statistics")
  13.  * @ORM\Entity(repositoryClass="App\Repository\Cvs\CandidatesHasStatisticsRepository")
  14.  * @ORM\HasLifecycleCallbacks()
  15.  */
  16. class CandidatesHasStatistics
  17. {
  18.     /**
  19.      * @var integer
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     protected $id;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  30.      */
  31.     private $createdAt;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  36.      */
  37.     private $updatedAt;
  38.     /**
  39.      * @var string
  40.      * Clics / Vues / Visited / Commented / Likes
  41.      *
  42.      * @ORM\Column(name="type", type="text", nullable=true)
  43.      */
  44.     private $type;
  45.     /**
  46.      * @var \Users
  47.      *
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\Core\Users")
  49.      * @ORM\JoinColumns({
  50.      *   @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
  51.      * })
  52.      */
  53.     protected $user;
  54.     /**
  55.      * @var \Candidates
  56.      *
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\Cvs\Candidates")
  58.      * @ORM\JoinColumns({
  59.      *   @ORM\JoinColumn(name="candidate_id", referencedColumnName="id", nullable=true)
  60.      * })
  61.      */
  62.     protected $candidate;
  63.     /**
  64.      * @ORM\PrePersist
  65.      */
  66.     public function setCreatedAtValue(): void
  67.     {
  68.         $this->setCreatedAt(new \DateTime("now"));
  69.         $this->setUpdatedAt(new \DateTime("now"));
  70.     }
  71.     /**
  72.      * @ORM\PreUpdate
  73.      */
  74.     public function setUpdatedAtValue(): void
  75.     {
  76.         $this->setUpdatedAt(new \DateTime("now"));
  77.     }
  78.     public function __toString()
  79.     {
  80.         return (string)$this->id;
  81.     }
  82.     public function getId(): ?int
  83.     {
  84.         return $this->id;
  85.     }
  86.     public function getCreatedAt(): ?\DateTimeInterface
  87.     {
  88.         return $this->createdAt;
  89.     }
  90.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  91.     {
  92.         $this->createdAt $createdAt;
  93.         return $this;
  94.     }
  95.     public function getUpdatedAt(): ?\DateTimeInterface
  96.     {
  97.         return $this->updatedAt;
  98.     }
  99.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  100.     {
  101.         $this->updatedAt $updatedAt;
  102.         return $this;
  103.     }
  104.     public function getType(): ?string
  105.     {
  106.         return $this->type;
  107.     }
  108.     public function setType(?string $type): static
  109.     {
  110.         $this->type $type;
  111.         return $this;
  112.     }
  113.     public function getUser(): ?Users
  114.     {
  115.         return $this->user;
  116.     }
  117.     public function setUser(?Users $user): static
  118.     {
  119.         $this->user $user;
  120.         return $this;
  121.     }
  122.     public function getCandidate(): ?Candidates
  123.     {
  124.         return $this->candidate;
  125.     }
  126.     public function setCandidate(?Candidates $candidate): static
  127.     {
  128.         $this->candidate $candidate;
  129.         return $this;
  130.     }
  131. }