mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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;
|
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\HasCenterInterface;
|
||||||
use Chill\MainBundle\Entity\HasScopeInterface;
|
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;
|
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report
|
* Class Report
|
||||||
|
*
|
||||||
|
* @package Chill\ReportBundle\Entity
|
||||||
|
* @ORM\Entity()
|
||||||
|
* @ORM\Table(null)
|
||||||
|
* @ORM\HasLifecycleCallbacks()
|
||||||
*/
|
*/
|
||||||
class Report implements HasCenterInterface, HasScopeInterface
|
class Report implements HasCenterInterface, HasScopeInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
|
*
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\Column(name="id", type="integer")
|
||||||
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var User
|
* @var User
|
||||||
|
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||||
*/
|
*/
|
||||||
private $user;
|
private $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Person
|
* @var Person
|
||||||
|
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
|
||||||
*/
|
*/
|
||||||
private $person;
|
private $person;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \DateTime
|
* @var \DateTime
|
||||||
|
* @ORM\Column(type="datetime")
|
||||||
*/
|
*/
|
||||||
private $date;
|
private $date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Scope
|
* @var Scope
|
||||||
|
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
|
||||||
*/
|
*/
|
||||||
private $scope;
|
private $scope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
|
* @ORM\Column(type="json_array")
|
||||||
*/
|
*/
|
||||||
private $cFData;
|
private $cFData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var CustomFieldsGroup
|
* @var CustomFieldsGroup
|
||||||
|
* @ORM\ManyToOne(
|
||||||
|
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup")
|
||||||
*/
|
*/
|
||||||
private $cFGroup;
|
private $cFGroup;
|
||||||
|
|
||||||
@ -81,8 +99,7 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
/**
|
/**
|
||||||
* Set user
|
* Set user
|
||||||
*
|
*
|
||||||
* @param \User $user
|
* @param User $user
|
||||||
*
|
|
||||||
* @return Report
|
* @return Report
|
||||||
*/
|
*/
|
||||||
public function setUser(User $user)
|
public function setUser(User $user)
|
||||||
@ -95,7 +112,7 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
/**
|
/**
|
||||||
* Get user
|
* Get user
|
||||||
*
|
*
|
||||||
* @return \User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public function getUser()
|
public function getUser()
|
||||||
{
|
{
|
||||||
@ -106,7 +123,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
* Set person
|
* Set person
|
||||||
*
|
*
|
||||||
* @param Person $person
|
* @param Person $person
|
||||||
*
|
|
||||||
* @return Report
|
* @return Report
|
||||||
*/
|
*/
|
||||||
public function setPerson(Person $person)
|
public function setPerson(Person $person)
|
||||||
@ -130,7 +146,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
* Set date
|
* Set date
|
||||||
*
|
*
|
||||||
* @param \DateTime $date
|
* @param \DateTime $date
|
||||||
*
|
|
||||||
* @return Report
|
* @return Report
|
||||||
*/
|
*/
|
||||||
public function setDate($date)
|
public function setDate($date)
|
||||||
@ -154,7 +169,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
* Set scope
|
* Set scope
|
||||||
*
|
*
|
||||||
* @param string $scope
|
* @param string $scope
|
||||||
*
|
|
||||||
* @return Report
|
* @return Report
|
||||||
*/
|
*/
|
||||||
public function setScope(Scope $scope)
|
public function setScope(Scope $scope)
|
||||||
@ -178,7 +192,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
* Set cFData
|
* Set cFData
|
||||||
*
|
*
|
||||||
* @param array $cFData
|
* @param array $cFData
|
||||||
*
|
|
||||||
* @return Report
|
* @return Report
|
||||||
*/
|
*/
|
||||||
public function setCFData(array $cFData)
|
public function setCFData(array $cFData)
|
||||||
@ -202,7 +215,6 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
* Set cFGroup
|
* Set cFGroup
|
||||||
*
|
*
|
||||||
* @param CustomFieldsGroup $cFGroup
|
* @param CustomFieldsGroup $cFGroup
|
||||||
*
|
|
||||||
* @return Report
|
* @return Report
|
||||||
*/
|
*/
|
||||||
public function setCFGroup(CustomFieldsGroup $cFGroup)
|
public function setCFGroup(CustomFieldsGroup $cFGroup)
|
||||||
@ -221,7 +233,10 @@ class Report implements HasCenterInterface, HasScopeInterface
|
|||||||
{
|
{
|
||||||
return $this->cFGroup;
|
return $this->cFGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Center
|
||||||
|
*/
|
||||||
public function getCenter()
|
public function getCenter()
|
||||||
{
|
{
|
||||||
return $this->person->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