2021-11-23 14:08:50 +01:00

231 lines
3.7 KiB
PHP

<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ReportBundle\Entity;
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Report.
*
* @ORM\Entity
* @ORM\Table(name="report")
* @ORM\HasLifecycleCallbacks
*/
class Report implements HasCenterInterface, HasScopeInterface
{
/**
* @var array
* @ORM\Column(type="json")
*/
private $cFData;
/**
* @var CustomFieldsGroup
* @ORM\ManyToOne(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup")
*/
private $cFGroup;
/**
* @var DateTime
* @ORM\Column(type="datetime")
*/
private $date;
/**
* @var int
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var Person
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private $person;
/**
* @var Scope
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*/
private $scope;
/**
* @var User
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private $user;
/**
* @return Center
*/
public function getCenter()
{
return $this->person->getCenter();
}
/**
* Get cFData.
*
* @return array
*/
public function getCFData()
{
return $this->cFData;
}
/**
* Get cFGroup.
*
* @return CustomFieldsGroup
*/
public function getCFGroup()
{
return $this->cFGroup;
}
/**
* Get date.
*
* @return DateTime
*/
public function getDate()
{
return $this->date;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Get person.
*
* @return Person
*/
public function getPerson()
{
return $this->person;
}
/**
* Get scope.
*
* @return Scope
*/
public function getScope()
{
return $this->scope;
}
/**
* Get user.
*
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* Set cFData.
*
* @return Report
*/
public function setCFData(array $cFData)
{
$this->cFData = $cFData;
return $this;
}
/**
* Set cFGroup.
*
* @return Report
*/
public function setCFGroup(CustomFieldsGroup $cFGroup)
{
$this->cFGroup = $cFGroup;
return $this;
}
/**
* Set date.
*
* @param DateTime $date
*
* @return Report
*/
public function setDate($date)
{
$this->date = $date;
return $this;
}
/**
* Set person.
*
* @return Report
*/
public function setPerson(Person $person)
{
$this->person = $person;
return $this;
}
/**
* Set scope.
*
* @param string $scope
*
* @return Report
*/
public function setScope(Scope $scope)
{
$this->scope = $scope;
return $this;
}
/**
* Set user.
*
* @return Report
*/
public function setUser(User $user)
{
$this->user = $user;
return $this;
}
}