feat: custom destinations
This commit is contained in:
@@ -3,15 +3,18 @@
|
||||
namespace App\Entity;
|
||||
|
||||
use App\BusProNet\Model\Pickup;
|
||||
use App\Entity\Traits\BlameableEntity;
|
||||
use App\Entity\Traits\SoftDeletableEntity;
|
||||
use App\Entity\Traits\TimestampableEntity;
|
||||
use App\Repository\DestinationRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
#[ORM\Entity(repositoryClass: DestinationRepository::class)]
|
||||
class Destination implements TimestampableEntityInterface, SoftDeletableEntityInterface
|
||||
class Destination implements TimestampableEntityInterface, SoftDeletableEntityInterface, BlameableEntityInterface
|
||||
{
|
||||
use BlameableEntity;
|
||||
use TimestampableEntity;
|
||||
use SoftDeletableEntity;
|
||||
|
||||
@@ -20,10 +23,10 @@ class Destination implements TimestampableEntityInterface, SoftDeletableEntityIn
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column]
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $busProId = null;
|
||||
|
||||
#[ORM\Column(length: 32)]
|
||||
#[ORM\Column(length: 32, nullable: true)]
|
||||
private ?string $code = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE)]
|
||||
@@ -81,7 +84,7 @@ class Destination implements TimestampableEntityInterface, SoftDeletableEntityIn
|
||||
return $this->dateFrom;
|
||||
}
|
||||
|
||||
public function setDateFrom(\DateTimeImmutable $dateFrom): static
|
||||
public function setDateFrom(?\DateTimeImmutable $dateFrom): static
|
||||
{
|
||||
$this->dateFrom = $dateFrom;
|
||||
|
||||
@@ -93,7 +96,7 @@ class Destination implements TimestampableEntityInterface, SoftDeletableEntityIn
|
||||
return $this->dateTo;
|
||||
}
|
||||
|
||||
public function setDateTo(\DateTimeImmutable $dateTo): static
|
||||
public function setDateTo(?\DateTimeImmutable $dateTo): static
|
||||
{
|
||||
$this->dateTo = $dateTo;
|
||||
|
||||
@@ -117,7 +120,7 @@ class Destination implements TimestampableEntityInterface, SoftDeletableEntityIn
|
||||
return $this->product;
|
||||
}
|
||||
|
||||
public function setProduct(string $product): static
|
||||
public function setProduct(?string $product): static
|
||||
{
|
||||
$this->product = $product;
|
||||
|
||||
@@ -129,7 +132,7 @@ class Destination implements TimestampableEntityInterface, SoftDeletableEntityIn
|
||||
return $this->hotel;
|
||||
}
|
||||
|
||||
public function setHotel(string $hotel): static
|
||||
public function setHotel(?string $hotel): static
|
||||
{
|
||||
$this->hotel = $hotel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user