src/Entity/AdministrationGeneralBox.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdministrationGeneralBoxRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=AdministrationGeneralBoxRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class AdministrationGeneralBox
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="integer", nullable=true)
  19.      */
  20.     private $income;
  21.     /**
  22.      * @ORM\Column(type="integer", nullable=true)
  23.      */
  24.     private $expenses;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=AdministrationMove::class, inversedBy="administrationGeneralBoxes")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $moveId;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      */
  33.     private $description;
  34.     /**
  35.      * @ORM\Column(type="datetime")
  36.      */
  37.     private $createdAt;
  38.     /**
  39.      * @ORM\Column(type="datetime", nullable=true)
  40.      */
  41.     private $updatedAt;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getIncome(): ?int
  47.     {
  48.         return $this->income;
  49.     }
  50.     public function setIncome($income): self
  51.     {
  52.         $this->income str_replace('.'''$income);
  53.         return $this;
  54.     }
  55.     public function getExpenses(): ?int
  56.     {
  57.         return $this->expenses;
  58.     }
  59.     public function setExpenses($expenses): self
  60.     {
  61.         $this->expenses str_replace('.'''$expenses);
  62.         return $this;
  63.     }
  64.     public function getMoveId(): ?AdministrationMove
  65.     {
  66.         return $this->moveId;
  67.     }
  68.     public function setMoveId(?AdministrationMove $moveId): self
  69.     {
  70.         $this->moveId $moveId;
  71.         return $this;
  72.     }
  73.     public function getDescription(): ?string
  74.     {
  75.         return $this->description;
  76.     }
  77.     public function setDescription(?string $description): self
  78.     {
  79.         $this->description $description;
  80.         return $this;
  81.     }
  82.     public function getCreatedAt(): ?\DateTimeInterface
  83.     {
  84.         return $this->createdAt;
  85.     }
  86.     /**
  87.      * @ORM\PrePersist
  88.      */
  89.     public function setCreatedAt(): self
  90.     {
  91.         $this->createdAt = new \DateTime();
  92.         return $this;
  93.     }
  94.     public function getUpdatedAt(): ?\DateTimeInterface
  95.     {
  96.         return $this->updatedAt;
  97.     }
  98.     /**
  99.      * @ORM\PreUpdate
  100.      */
  101.     public function setUpdatedAt(): self
  102.     {
  103.         $this->updatedAt = new \DateTime();
  104.         return $this;
  105.     }
  106. }