<?php
namespace App\Entity;
use App\Repository\DevisRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=DevisRepository::class)
*/
class Devis
{
/**
* @Gedmo\Slug(fields={"titre", "id"})
* @ORM\Column(length=128, unique=false)
*/
private $slug;
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\CategorieEntreprise")
*/
private $categorieEntreprise;
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\Photo")
*/
private $proofOfWork;
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\AppUser")
*/
private $user;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $estOuvert;
const TYPE_DEVIS_ORDINAIRE = 'ORDINAIRE';
const TYPE_DEVIS_PREMIUM = 'PREMIUM';
/**
* @ORM\Column(type="string", length="255", nullable=true)
*/
private $typeDevis;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nombreDeVue;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nombreDOffre;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $laDate;
/**
* @ORM\Column(type="string", length=255)
*/
private $titre;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $contenu;
/**
* @ORM\Column(type="float")
*/
private $budgetMin;
/**
* @ORM\Column(type="float")
*/
private $budgetMax;
/**
* @var string|null
*
* @ORM\Column(name="annee", type="string", length=255, nullable=true)
*/
private $annee;
/**
* @var string|null
*
* @ORM\Column(name="mois", type="string", length=255, nullable=true)
*/
private $mois;
public function __construct()
{
$this->laDate = new \DateTime();
$this->estOuvert = true;
$this->nombreDeVue = 0;
$this->nombreDOffre = 0;
$this->mois = date('mY');
$this->annee = date('Y');
$this->budgetMin = 0;
$this->budgetMax = 0;
$this->typeDevis = "ORDINAIRE";
}
public function getId(): ?int
{
return $this->id;
}
public function getEstOuvert(): ?bool
{
return $this->estOuvert;
}
public function setEstOuvert(?bool $estOuvert): self
{
$this->estOuvert = $estOuvert;
return $this;
}
public function getNombreDeVue(): ?int
{
return $this->nombreDeVue;
}
public function setNombreDeVue(?int $nombreDeVue): self
{
$this->nombreDeVue = $nombreDeVue;
return $this;
}
public function getNombreDOffre(): ?int
{
return $this->nombreDOffre;
}
public function setNombreDOffre(?int $nombreDOffre): self
{
$this->nombreDOffre = $nombreDOffre;
return $this;
}
public function getLaDate(): ?\DateTimeInterface
{
return $this->laDate;
}
public function setLaDate(?\DateTimeInterface $laDate): self
{
$this->laDate = $laDate;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getBudgetMin(): ?float
{
return $this->budgetMin;
}
public function setBudgetMin(?float $budgetMin): self
{
$this->budgetMin = $budgetMin;
return $this;
}
public function getBudgetMax(): ?float
{
return $this->budgetMax;
}
public function setBudgetMax(?float $budgetMax): self
{
$this->budgetMax = $budgetMax;
return $this;
}
public function getContenu(): ?string
{
return $this->contenu;
}
public function setContenu(?string $contenu): self
{
$this->contenu = $contenu;
return $this;
}
public function getCategorieEntreprise(): ?CategorieEntreprise
{
return $this->categorieEntreprise;
}
public function setCategorieEntreprise(?CategorieEntreprise $categorieEntreprise): self
{
$this->categorieEntreprise = $categorieEntreprise;
return $this;
}
public function getUser(): ?AppUser
{
return $this->user;
}
public function setUser(?AppUser $user): self
{
$this->user = $user;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getAnnee(): ?string
{
return $this->annee;
}
public function setAnnee(?string $annee): self
{
$this->annee = $annee;
return $this;
}
public function getMois(): ?string
{
return $this->mois;
}
public function setMois(?string $mois): self
{
$this->mois = $mois;
return $this;
}
public function isEstOuvert(): ?bool
{
return $this->estOuvert;
}
public function getProofOfWork(): ?Photo
{
return $this->proofOfWork;
}
public function setProofOfWork(?Photo $proofOfWork): self
{
$this->proofOfWork = $proofOfWork;
return $this;
}
public function getTypeDevis(): ?string
{
return $this->typeDevis;
}
public function setTypeDevis(?string $typeDevis): self
{
$this->typeDevis = $typeDevis;
return $this;
}
}