<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* SurveyCCAS
*
* @ORM\Table(name="surveyCCAS")
* @ORM\Entity(repositoryClass="App\Repository\SurveyCCASRepository")
*/
class SurveyCCAS
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var \DateTime
*
* @ORM\Column(name="date", type="datetime")
*/
private $date;
/**
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="House", inversedBy="surveyCCASs")
*/
private $house;
/**
* @var int
*
* @ORM\Column(name="number", type="integer")
*/
private $number;
/**
* @var string
*
* @ORM\Column(name="answers", type="json")
*/
private $answers;
/**
* @ORM\ManyToOne(targetEntity="Meeting", inversedBy="surveyCCASs")
*/
private $meeting;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set date
*
* @param \DateTime $date
*
* @return SurveyCCAS
*/
public function setDate($date)
{
$this->date = $date;
return $this;
}
/**
* Get date
*
* @return \DateTime
*/
public function getDate()
{
return $this->date;
}
/**
* Set user
*
* @param integer $user
*
* @return SurveyCCAS
*/
public function setUser(\App\Entity\User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return int
*/
public function getUser()
{
return $this->user;
}
/**
* Set house
*
* @param integer $house
*
* @return SurveyCCAS
*/
public function setHouse(\App\Entity\House $house)
{
$this->house = $house;
return $this;
}
/**
* Get house
*
* @return int
*/
public function getHouse()
{
return $this->house;
}
/**
* Set number
*
* @param integer $number
*
* @return SurveyCCAS
*/
public function setNumber($number)
{
$this->number = $number;
return $this;
}
/**
* Get number
*
* @return int
*/
public function getNumber()
{
return $this->number;
}
/**
* Set answers
*
* @param string $answers
*
* @return SurveyCCAS
*/
public function setAnswers($answers)
{
$this->answers = $answers;
return $this;
}
/**
* Get answers
*
* @return string
*/
public function getAnswers()
{
return $this->answers;
}
/**
* Get ansers formated to array
*
* @return array
*/
public function getAnswersFormated()
{
return json_encode($this->answers);
}
/**
* Set meeting
*
* @param \App\Entity\Meeting $meeting
*
* @return SurveyCCAS
*/
public function setMeeting(\App\Entity\Meeting $meeting = null)
{
$this->meeting = $meeting;
return $this;
}
/**
* Get meeting
*
* @return \App\Entity\Meeting
*/
public function getMeeting()
{
return $this->meeting;
}
}