src/Entity/CompanySurveyForm.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Timestampable\Traits\TimestampableEntity;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\CompanySurveyFormRepository")
  7.  */
  8. class CompanySurveyForm
  9. {
  10.     use TimestampableEntity;
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="companySurveyForms")
  19.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  20.      */
  21.     private $company;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\SurveyForm")
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $surveyForm;
  27.     /**
  28.      * @var int
  29.      *
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $nbContributions;
  33.     /**
  34.      * @var float
  35.      *
  36.      * @ORM\Column(type="decimal", precision=8, scale=6, nullable=true)
  37.      */
  38.     private $rating;
  39.     public function __construct()
  40.     {
  41.         $this->nbContributions 0;
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getCompany(): ?Company
  48.     {
  49.         return $this->company;
  50.     }
  51.     public function setCompany(?Company $company): self
  52.     {
  53.         $this->company $company;
  54.         return $this;
  55.     }
  56.     public function getSurveyForm(): ?SurveyForm
  57.     {
  58.         return $this->surveyForm;
  59.     }
  60.     public function setSurveyForm(?SurveyForm $form): self
  61.     {
  62.         $this->surveyForm $form;
  63.         return $this;
  64.     }
  65.     public function getNbContributions(): ?int
  66.     {
  67.         return $this->nbContributions;
  68.     }
  69.     public function setNbContributions(int $nbContributions): self
  70.     {
  71.         $this->nbContributions $nbContributions;
  72.         return $this;
  73.     }
  74.     public function getRating(): ?float
  75.     {
  76.         return $this->rating;
  77.     }
  78.     public function setRating(?float $rating): self
  79.     {
  80.         $this->rating $rating;
  81.         return $this;
  82.     }
  83. }