src/Entity/Devis.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DevisRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Entity(repositoryClass=DevisRepository::class)
  8.  */
  9. class Devis
  10. {
  11.     
  12.     /**
  13.     * @Gedmo\Slug(fields={"titre", "id"})
  14.     * @ORM\Column(length=128, unique=false)
  15.     */
  16.     private $slug;
  17.     
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity="\App\Entity\CategorieEntreprise")
  20.      */
  21.     private $categorieEntreprise;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="\App\Entity\Photo")
  24.      */
  25.     private $proofOfWork;
  26.     
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="\App\Entity\AppUser")
  29.      */
  30.     private $user;
  31.     
  32.     /**
  33.      * @ORM\Id
  34.      * @ORM\GeneratedValue
  35.      * @ORM\Column(type="integer")
  36.      */
  37.     private $id;
  38.     /**
  39.      * @ORM\Column(type="boolean", nullable=true)
  40.      */
  41.     private $estOuvert;
  42.     const TYPE_DEVIS_ORDINAIRE 'ORDINAIRE';
  43.     const TYPE_DEVIS_PREMIUM 'PREMIUM';
  44.     /**
  45.      * @ORM\Column(type="string", length="255", nullable=true)
  46.      */
  47.     private $typeDevis;
  48.     /**
  49.      * @ORM\Column(type="integer", nullable=true)
  50.      */
  51.     private $nombreDeVue;
  52.     /**
  53.      * @ORM\Column(type="integer", nullable=true)
  54.      */
  55.     private $nombreDOffre;
  56.     /**
  57.      * @ORM\Column(type="datetime", nullable=true)
  58.      */
  59.     private $laDate;
  60.     /**
  61.      * @ORM\Column(type="string", length=255)
  62.      */
  63.     private $titre;
  64.     /**
  65.      * @ORM\Column(type="text", nullable=true)
  66.      */
  67.     private $contenu;
  68.     
  69.     /**
  70.      * @ORM\Column(type="float")
  71.      */
  72.     private $budgetMin;
  73.     /**
  74.      * @ORM\Column(type="float")
  75.      */
  76.     private $budgetMax;
  77.     
  78.     /**
  79.      * @var string|null
  80.      *
  81.      * @ORM\Column(name="annee", type="string", length=255, nullable=true)
  82.      */
  83.     private $annee;
  84.     
  85.     /**
  86.      * @var string|null
  87.      *
  88.      * @ORM\Column(name="mois", type="string", length=255, nullable=true)
  89.      */
  90.     private $mois;
  91.     
  92.     public function __construct()
  93.           {
  94.               $this->laDate = new \DateTime();
  95.                                    $this->estOuvert true;
  96.                                    $this->nombreDeVue 0;
  97.                                      $this->nombreDOffre 0;
  98.                                    $this->mois date('mY');
  99.                                    $this->annee date('Y');
  100.                                 $this->budgetMin 0;
  101.                                 $this->budgetMax 0;
  102.                                 $this->typeDevis "ORDINAIRE";
  103.                                                      
  104.           }
  105.     public function getId(): ?int
  106.     {
  107.         return $this->id;
  108.     }
  109.     public function getEstOuvert(): ?bool
  110.     {
  111.         return $this->estOuvert;
  112.     }
  113.     public function setEstOuvert(?bool $estOuvert): self
  114.     {
  115.         $this->estOuvert $estOuvert;
  116.         return $this;
  117.     }
  118.     public function getNombreDeVue(): ?int
  119.     {
  120.         return $this->nombreDeVue;
  121.     }
  122.     public function setNombreDeVue(?int $nombreDeVue): self
  123.     {
  124.         $this->nombreDeVue $nombreDeVue;
  125.         return $this;
  126.     }
  127.     public function getNombreDOffre(): ?int
  128.     {
  129.         return $this->nombreDOffre;
  130.     }
  131.     public function setNombreDOffre(?int $nombreDOffre): self
  132.     {
  133.         $this->nombreDOffre $nombreDOffre;
  134.         return $this;
  135.     }
  136.     public function getLaDate(): ?\DateTimeInterface
  137.     {
  138.         return $this->laDate;
  139.     }
  140.     public function setLaDate(?\DateTimeInterface $laDate): self
  141.     {
  142.         $this->laDate $laDate;
  143.         return $this;
  144.     }
  145.     public function getTitre(): ?string
  146.     {
  147.         return $this->titre;
  148.     }
  149.     public function setTitre(?string $titre): self
  150.     {
  151.         $this->titre $titre;
  152.         return $this;
  153.     }
  154.     public function getBudgetMin(): ?float
  155.     {
  156.         return $this->budgetMin;
  157.     }
  158.     public function setBudgetMin(?float $budgetMin): self
  159.     {
  160.         $this->budgetMin $budgetMin;
  161.         return $this;
  162.     }
  163.     public function getBudgetMax(): ?float
  164.     {
  165.         return $this->budgetMax;
  166.     }
  167.     public function setBudgetMax(?float $budgetMax): self
  168.     {
  169.         $this->budgetMax $budgetMax;
  170.         return $this;
  171.     }
  172.     public function getContenu(): ?string
  173.     {
  174.         return $this->contenu;
  175.     }
  176.     public function setContenu(?string $contenu): self
  177.     {
  178.         $this->contenu $contenu;
  179.         return $this;
  180.     }
  181.     public function getCategorieEntreprise(): ?CategorieEntreprise
  182.     {
  183.         return $this->categorieEntreprise;
  184.     }
  185.     public function setCategorieEntreprise(?CategorieEntreprise $categorieEntreprise): self
  186.     {
  187.         $this->categorieEntreprise $categorieEntreprise;
  188.         return $this;
  189.     }
  190.     public function getUser(): ?AppUser
  191.     {
  192.         return $this->user;
  193.     }
  194.     public function setUser(?AppUser $user): self
  195.     {
  196.         $this->user $user;
  197.         return $this;
  198.     }
  199.     public function getSlug(): ?string
  200.     {
  201.         return $this->slug;
  202.     }
  203.     public function setSlug(string $slug): self
  204.     {
  205.         $this->slug $slug;
  206.         return $this;
  207.     }
  208.     public function getAnnee(): ?string
  209.     {
  210.         return $this->annee;
  211.     }
  212.     public function setAnnee(?string $annee): self
  213.     {
  214.         $this->annee $annee;
  215.         return $this;
  216.     }
  217.     public function getMois(): ?string
  218.     {
  219.         return $this->mois;
  220.     }
  221.     public function setMois(?string $mois): self
  222.     {
  223.         $this->mois $mois;
  224.         return $this;
  225.     }
  226.     public function isEstOuvert(): ?bool
  227.     {
  228.         return $this->estOuvert;
  229.     }
  230.     public function getProofOfWork(): ?Photo
  231.     {
  232.         return $this->proofOfWork;
  233.     }
  234.     public function setProofOfWork(?Photo $proofOfWork): self
  235.     {
  236.         $this->proofOfWork $proofOfWork;
  237.         return $this;
  238.     }
  239.     public function getTypeDevis(): ?string
  240.     {
  241.         return $this->typeDevis;
  242.     }
  243.     public function setTypeDevis(?string $typeDevis): self
  244.     {
  245.         $this->typeDevis $typeDevis;
  246.         return $this;
  247.     }
  248. }