GreaterThan
This commit is contained in:
@@ -7,6 +7,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\DBAL\Types\Types;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: SortieRepository::class)]
|
#[ORM\Entity(repositoryClass: SortieRepository::class)]
|
||||||
class Sortie
|
class Sortie
|
||||||
@@ -21,12 +22,14 @@ class Sortie
|
|||||||
private ?string $nom = null;
|
private ?string $nom = null;
|
||||||
|
|
||||||
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
|
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
|
||||||
|
#[Assert\GreaterThan(propertyPath: 'dateLimiteInscription')]
|
||||||
private ?\DateTimeInterface $dateHeureDebut = null;
|
private ?\DateTimeInterface $dateHeureDebut = null;
|
||||||
|
|
||||||
#[ORM\Column(nullable: true)]
|
#[ORM\Column(nullable: true)]
|
||||||
private ?int $duree = null;
|
private ?int $duree = null;
|
||||||
|
|
||||||
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
|
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
|
||||||
|
#[Assert\GreaterThan("today")]
|
||||||
private ?\DateTimeInterface $dateLimiteInscription = null;
|
private ?\DateTimeInterface $dateLimiteInscription = null;
|
||||||
|
|
||||||
#[ORM\Column(nullable: true)]
|
#[ORM\Column(nullable: true)]
|
||||||
|
|||||||
Reference in New Issue
Block a user