src/Entity/Saloon/WorkingHours.php line 13

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by simpson <simpsonwork@gmail.com>
  4.  * Date: 2019-04-16
  5.  * Time: 19:02
  6.  */
  7. namespace App\Entity\Saloon;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Embeddable]
  10. final class WorkingHours
  11. {
  12.     #[ORM\Column(name'since'type'time_immutable'nullabletrue)]
  13.     protected ?\DateTimeImmutable $since;
  14.     #[ORM\Column(name'till'type'time_immutable'nullabletrue)]
  15.     protected ?\DateTimeImmutable $till;
  16.     public function __construct(?\DateTimeImmutable $since, ?\DateTimeImmutable $till)
  17.     {
  18.         $this->since $since;
  19.         $this->till $till;
  20.     }
  21.     public function getSince(): ?\DateTimeImmutable
  22.     {
  23.         return $this->since;
  24.     }
  25.     public function getTill(): ?\DateTimeImmutable
  26.     {
  27.         return $this->till;
  28.     }
  29. }