src/Entity/AccountRunout.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use DateTimeInterface;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * AccountRunout
  8.  *
  9.  * @ORM\Table(name="accounts_runout")
  10.  * @ORM\Entity
  11.  */
  12. class AccountRunout
  13. {
  14.     /**
  15.      * @var DateTime
  16.      *
  17.      * @ORM\Column(name="created", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  18.      */
  19.     private $created null;
  20.     /**
  21.      * @var string|null
  22.      *
  23.      * @ORM\Column(name="runout", type="decimal", precision=18, scale=9, nullable=true)
  24.      */
  25.     private $runout;
  26.     /**
  27.      * @var Account
  28.      *
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="NONE")
  31.      * @ORM\OneToOne(targetEntity="Account")
  32.      * @ORM\JoinColumns({
  33.      *   @ORM\JoinColumn(name="id", referencedColumnName="id")
  34.      * })
  35.      */
  36.     private $account;
  37.     public function __construct()
  38.     {
  39.         $this->created = new DateTime();
  40.     }
  41.     public function getCreated(): ?DateTimeInterface
  42.     {
  43.         return $this->created;
  44.     }
  45.     public function setCreated(DateTimeInterface $created): self
  46.     {
  47.         $this->created $created;
  48.         return $this;
  49.     }
  50.     public function getRunout(): ?string
  51.     {
  52.         return $this->runout;
  53.     }
  54.     public function setRunout(?string $runout): self
  55.     {
  56.         $this->runout $runout;
  57.         return $this;
  58.     }
  59. }