mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
task: api endpoint for my tasks
This commit is contained in:
@@ -18,6 +18,7 @@ use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
use function array_fill_keys;
|
||||
@@ -27,6 +28,9 @@ use function array_keys;
|
||||
* AbstractTask.
|
||||
*
|
||||
* @ORM\MappedSuperclass
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "single_task": SingleTask::class
|
||||
* })
|
||||
*/
|
||||
abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
{
|
||||
@@ -35,6 +39,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="\Chill\MainBundle\Entity\User"
|
||||
* )
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $assignee;
|
||||
|
||||
@@ -49,12 +54,14 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
/**
|
||||
* @var bool
|
||||
* @ORM\Column(name="closed", type="boolean", options={ "default": false })
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $closed = false;
|
||||
|
||||
/**
|
||||
* @var AccompanyingPeriod
|
||||
* @ORM\ManyToOne(targetEntity="\Chill\PersonBundle\Entity\AccompanyingPeriod")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $course;
|
||||
|
||||
@@ -62,6 +69,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
* @var json
|
||||
*
|
||||
* @ORM\Column(name="current_states", type="json")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $currentStates = [];
|
||||
|
||||
@@ -69,6 +77,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="description", type="text")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $description = '';
|
||||
|
||||
@@ -77,6 +86,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="\Chill\PersonBundle\Entity\Person"
|
||||
* )
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $person;
|
||||
|
||||
@@ -85,6 +95,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
*
|
||||
* @ORM\Column(name="title", type="text")
|
||||
* @Assert\NotBlank
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $title = '';
|
||||
|
||||
@@ -92,6 +103,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="type", type="string", length=255)
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $type;
|
||||
|
||||
|
Reference in New Issue
Block a user