src/Entity/BuildingReportingHistory.php line 10
<?php
namespace App\Entity;
use App\Repository\BuildingReportingHistoryRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: BuildingReportingHistoryRepository::class)]
class BuildingReportingHistory
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'buildingReportingHistoriesUser')]
private ?User $user = null;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\ManyToOne(inversedBy: 'buildingReportingHistories')]
private ?Building $building = null;
#[ORM\ManyToOne(inversedBy: 'buildingReportingHistories')]
private ?City $city = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $street = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $numberStreet = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $postalCode = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateStartLease = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $statusBuilding = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $statusAnnouncment = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $numberId = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $country = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $detail = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $number = null;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable('now', new \DateTimeZone('Europe/Paris'));
}
public function getExportData(): array
{
return \array_merge([
'id' => $this->numberId,
'user' => $this->user?->getId(),
'date' => $this->createdAt->format('d/m/Y H:i'),
'type' => $this->type,
'building' => $this->building?->getId(),
'city' => $this->city?->getCity(),
'street' => $this->street,
'numberStreet' => $this->numberStreet,
'postalCode' => $this->postalCode,
'dateAvailable' => $this->dateStartLease?->format('d/m/Y'),
'statusBuilding' => $this->statusBuilding,
'statusAnnouncment' => $this->statusAnnouncment,
]);
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getBuilding(): ?Building
{
return $this->building;
}
public function setBuilding(?Building $building): self
{
$this->building = $building;
return $this;
}
public function getCity(): ?City
{
return $this->city;
}
public function setCity(?City $city): self
{
$this->city = $city;
return $this;
}
public function getStreet(): ?string
{
return $this->street;
}
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
public function getNumberStreet(): ?string
{
return $this->numberStreet;
}
public function setNumberStreet(?string $numberStreet): self
{
$this->numberStreet = $numberStreet;
return $this;
}
public function getPostalCode(): ?string
{
return $this->postalCode;
}
public function setPostalCode(?string $postalCode): self
{
$this->postalCode = $postalCode;
return $this;
}
public function getDateStartLease(): ?\DateTimeInterface
{
return $this->dateStartLease;
}
public function setDateStartLease(?\DateTimeInterface $dateStartLease): self
{
$this->dateStartLease = $dateStartLease;
return $this;
}
public function getStatusBuilding(): ?string
{
return $this->statusBuilding;
}
public function setStatusBuilding(?string $statusBuilding): self
{
$this->statusBuilding = $statusBuilding;
return $this;
}
public function getStatusAnnouncment(): ?string
{
return $this->statusAnnouncment;
}
public function setStatusAnnouncment(?string $statusAnnouncment): self
{
$this->statusAnnouncment = $statusAnnouncment;
return $this;
}
public function getNumberId(): ?string
{
return $this->numberId;
}
public function setNumberId(?string $numberId): self
{
$this->numberId = $numberId;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getDetail(): ?string
{
return $this->detail;
}
public function setDetail(?string $detail): self
{
$this->detail = $detail;
return $this;
}
public function getNumber(): ?string
{
return $this->number;
}
public function setNumber(?string $number): self
{
$this->number = $number;
return $this;
}
}