<?phpnamespace App\Entity\Bus;use App\Entity\User;use Doctrine\ORM\Mapping as ORM;/** * Single-row switch controlling whether the public passenger mobile app can * reach the booking API (see App\EventSubscriber\PassengerAppAvailabilitySubscriber, * the only thing that reads this). Turning it off doesn't touch staff/clerk * traffic on the same /bus_api routes - clerks keep booking passengers at * the counter while the app is dark. * * @ORM\Entity(repositoryClass="App\Repository\Bus\PassengerAppSettingRepository") * @ORM\Table(name="bus_passenger_app_setting") */class PassengerAppSetting{ /** * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="boolean") */ private $enabled = true; /** * Shown to passengers in the app when enabled is false. Falls back to a * default message (see the controller) when left blank. * * @ORM\Column(type="string", length=255, nullable=true) */ private $disabledMessage; /** * @ORM\Column(type="datetime") */ private $updatedAt; /** * @ORM\ManyToOne(targetEntity="App\Entity\User") * @ORM\JoinColumn(name="updated_by_id", referencedColumnName="id", nullable=true, onDelete="SET NULL") */ private $updatedBy; public function __construct() { $this->updatedAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function isEnabled(): bool { return $this->enabled; } public function setEnabled(bool $enabled): self { $this->enabled = $enabled; return $this; } public function getDisabledMessage(): ?string { return $this->disabledMessage; } public function setDisabledMessage(?string $disabledMessage): self { $this->disabledMessage = $disabledMessage; return $this; } public function getUpdatedAt(): \DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getUpdatedBy(): ?User { return $this->updatedBy; } public function setUpdatedBy(?User $updatedBy): self { $this->updatedBy = $updatedBy; return $this; }}