<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
/**
* @ORM\Entity(repositoryClass="App\Repository\CompanySurveyFormRepository")
*/
class CompanySurveyForm
{
use TimestampableEntity;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="companySurveyForms")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $company;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SurveyForm")
* @ORM\JoinColumn(nullable=true)
*/
private $surveyForm;
/**
* @var int
*
* @ORM\Column(type="integer")
*/
private $nbContributions;
/**
* @var float
*
* @ORM\Column(type="decimal", precision=8, scale=6, nullable=true)
*/
private $rating;
public function __construct()
{
$this->nbContributions = 0;
}
public function getId(): ?int
{
return $this->id;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getSurveyForm(): ?SurveyForm
{
return $this->surveyForm;
}
public function setSurveyForm(?SurveyForm $form): self
{
$this->surveyForm = $form;
return $this;
}
public function getNbContributions(): ?int
{
return $this->nbContributions;
}
public function setNbContributions(int $nbContributions): self
{
$this->nbContributions = $nbContributions;
return $this;
}
public function getRating(): ?float
{
return $this->rating;
}
public function setRating(?float $rating): self
{
$this->rating = $rating;
return $this;
}
}