<?php
namespace App\Entity;
use App\Repository\AdministrationDailyBoxRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AdministrationDailyBoxRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class AdministrationDailyBox
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $income;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $expenses;
/**
* @ORM\ManyToOne(targetEntity=AdministrationMove::class, inversedBy="administrationDailyBoxes")
* @ORM\JoinColumn(nullable=false)
*/
private $moveId;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
public function getId(): ?int
{
return $this->id;
}
public function getIncome(): ?int
{
return $this->income;
}
public function setIncome($income): self
{
$this->income = str_replace('.', '', $income);
return $this;
}
public function getExpenses(): ?int
{
return $this->expenses;
}
public function setExpenses($expenses): self
{
$this->expenses = str_replace('.', '', $expenses);
return $this;
}
public function getMoveId(): ?AdministrationMove
{
return $this->moveId;
}
public function setMoveId(?AdministrationMove $moveId): self
{
$this->moveId = $moveId;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAt(): self
{
$this->createdAt = new \DateTime();
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAt(): self
{
$this->updatedAt = new \DateTime();
return $this;
}
}