src/Entity/Engagement/EngagementBudgetPrevisionel.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Engagement;
  3. use App\Repository\EngagementBudgetPrevisionelRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=EngagementBudgetPrevisionelRepository::class)
  7.  */
  8. class EngagementBudgetPrevisionel
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="float", nullable=true)
  18.      */
  19.     private $montant;
  20.     /**
  21.      * @ORM\Column(type="datetime", nullable=true)
  22.      */
  23.     private $createdAt;
  24.     /**
  25.      * @ORM\Column(type="text", nullable=true)
  26.      */
  27.     private $token;
  28.     public function __construct()
  29.     {
  30.         $this->createdAt = new \DateTime();
  31.         $this->token =  md5(uniqid());
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getMontant(): ?float
  38.     {
  39.         return $this->montant;
  40.     }
  41.     public function setMontant(?float $montant): self
  42.     {
  43.         $this->montant = $montant;
  44.         return $this;
  45.     }
  46.     public function getCreatedAt(): ?\DateTimeInterface
  47.     {
  48.         return $this->createdAt;
  49.     }
  50.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  51.     {
  52.         $this->createdAt = $createdAt;
  53.         return $this;
  54.     }
  55.     public function getToken(): ?string
  56.     {
  57.         return $this->token;
  58.     }
  59.     public function setToken(?string $token): self
  60.     {
  61.         $this->token = $token;
  62.         return $this;
  63.     }
  64. }