<?php
namespace App\Entity;
use App\Repository\PropositionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PropositionRepository::class)
*/
class Proposition
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Lot::class, inversedBy="propositions")
* @ORM\JoinColumn(nullable=false)
*/
private $lot;
/**
* @ORM\ManyToOne(targetEntity=Prospect::class, inversedBy="propositions")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE" )
*/
private $prospect;
/**
* @ORM\Column(type="boolean", options={"default":true})
*/
private $activeProposition = true;
/**
* @ORM\Column(type="datetime")
*/
private $dateheure;
public function __construct() {
$this->dateheure = new \DateTime("now");
$this->activeProposition = true;
}
public function getId(): ?int
{
return $this->id;
}
public function getLot(): ?Lot
{
return $this->lot;
}
public function setLot(?Lot $lot): self
{
$this->lot = $lot;
return $this;
}
public function getProspect(): ?Prospect
{
return $this->prospect;
}
public function setProspect(?Prospect $prospect): self
{
$this->prospect = $prospect;
return $this;
}
public function isActiveProposition(): bool
{
return $this->activeProposition;
}
public function setActiveProposition(bool $activeProposition): self
{
$this->activeProposition = $activeProposition;
return $this;
}
public function getDateheure(): ?\DateTimeInterface
{
return $this->dateheure;
}
public function setDateheure(\DateTimeInterface $dateheure): self
{
$this->dateheure = $dateheure;
return $this;
}
public function getVisite(): ?int
{
return $this->visite;
}
public function setVisite(?int $visite): self
{
$this->visite = $visite;
return $this;
}
}