mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
sf4 deprecated: migrate Doctrine ORM mapping to annotation
This commit is contained in:
parent
a812a0c132
commit
91c965cda6
@ -20,50 +20,68 @@
|
||||
|
||||
namespace Chill\ReportBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
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 Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
|
||||
|
||||
/**
|
||||
* Report
|
||||
* Class Report
|
||||
*
|
||||
* @package Chill\ReportBundle\Entity
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table(null)
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
class Report implements HasCenterInterface, HasScopeInterface
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var User
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @var Person
|
||||
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
*/
|
||||
private $person;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* @var Scope
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
|
||||
*/
|
||||
private $scope;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @ORM\Column(type="json_array")
|
||||
*/
|
||||
private $cFData;
|
||||
|
||||
/**
|
||||
* @var CustomFieldsGroup
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup")
|
||||
*/
|
||||
private $cFGroup;
|
||||
|
||||
@ -81,8 +99,7 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
/**
|
||||
* Set user
|
||||
*
|
||||
* @param \User $user
|
||||
*
|
||||
* @param User $user
|
||||
* @return Report
|
||||
*/
|
||||
public function setUser(User $user)
|
||||
@ -95,7 +112,7 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
/**
|
||||
* Get user
|
||||
*
|
||||
* @return \User
|
||||
* @return User
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
@ -106,7 +123,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
* Set person
|
||||
*
|
||||
* @param Person $person
|
||||
*
|
||||
* @return Report
|
||||
*/
|
||||
public function setPerson(Person $person)
|
||||
@ -130,7 +146,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
* Set date
|
||||
*
|
||||
* @param \DateTime $date
|
||||
*
|
||||
* @return Report
|
||||
*/
|
||||
public function setDate($date)
|
||||
@ -154,7 +169,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
* Set scope
|
||||
*
|
||||
* @param string $scope
|
||||
*
|
||||
* @return Report
|
||||
*/
|
||||
public function setScope(Scope $scope)
|
||||
@ -178,7 +192,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
* Set cFData
|
||||
*
|
||||
* @param array $cFData
|
||||
*
|
||||
* @return Report
|
||||
*/
|
||||
public function setCFData(array $cFData)
|
||||
@ -202,7 +215,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
* Set cFGroup
|
||||
*
|
||||
* @param CustomFieldsGroup $cFGroup
|
||||
*
|
||||
* @return Report
|
||||
*/
|
||||
public function setCFGroup(CustomFieldsGroup $cFGroup)
|
||||
@ -221,7 +233,10 @@ class Report implements HasCenterInterface, HasScopeInterface
|
||||
{
|
||||
return $this->cFGroup;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Center
|
||||
*/
|
||||
public function getCenter()
|
||||
{
|
||||
return $this->person->getCenter();
|
||||
|
@ -1,25 +0,0 @@
|
||||
Chill\ReportBundle\Entity\Report:
|
||||
type: entity
|
||||
table: null
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
fields:
|
||||
date:
|
||||
type: datetime
|
||||
cFData:
|
||||
type: json_array
|
||||
manyToOne:
|
||||
user:
|
||||
targetEntity: Chill\MainBundle\Entity\User
|
||||
person:
|
||||
targetEntity: Chill\PersonBundle\Entity\Person
|
||||
scope:
|
||||
targetEntity: Chill\MainBundle\Entity\Scope
|
||||
cFGroup:
|
||||
targetEntity: Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
|
||||
lifecycleCallbacks: { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user