mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
improve homepage_widget tables with datas
This commit is contained in:
@@ -18,6 +18,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* SingleTask.
|
||||
@@ -48,6 +49,7 @@ class SingleTask extends AbstractTask
|
||||
*
|
||||
* @ORM\Column(name="end_date", type="date", nullable=true)
|
||||
* @Assert\Date
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $endDate;
|
||||
|
||||
@@ -57,6 +59,7 @@ class SingleTask extends AbstractTask
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
@@ -73,6 +76,7 @@ class SingleTask extends AbstractTask
|
||||
* @var DateTime
|
||||
*
|
||||
* @ORM\Column(name="start_date", type="date", nullable=true)
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Assert\Date
|
||||
*
|
||||
* @Assert\Expression(
|
||||
@@ -102,6 +106,7 @@ class SingleTask extends AbstractTask
|
||||
* and this.getEndDate() === null
|
||||
*
|
||||
* @ORM\Column(name="warning_interval", type="dateinterval", nullable=true)
|
||||
* @Serializer\Groups({"read"})
|
||||
*
|
||||
* @Assert\Expression(
|
||||
* "!(value != null and this.getEndDate() == null)",
|
||||
@@ -162,6 +167,7 @@ class SingleTask extends AbstractTask
|
||||
* Return null if warningDate or endDate is null
|
||||
*
|
||||
* @return DateTimeImmutable
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public function getWarningDate()
|
||||
{
|
||||
|
Reference in New Issue
Block a user