You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace App\Http\Controllers\Web\SeasonTicketContract\Selection;
-
- use App\Exceptions\GeneralErrorMessageException;
- use App\Http\Controllers\Web\WebController;
- use App\Kintone\Models\DropDown\SeasonTicketContractSelection\SelectionStatus;
- use App\Logic\SeasonTicketContractSelectionManager;
- use Illuminate\Http\JsonResponse;
- use Illuminate\Http\Request;
-
- class SelectionInfoController extends WebController
- {
-
- public function name(): string
- {
- return "申込内容取得";
- }
-
- public function description(): string
- {
- return "申込内容を取得する";
- }
-
-
- public function __construct(protected SelectionInfoParams $param)
- {
- parent::__construct();
- }
-
- protected function run(Request $request): JsonResponse
- {
- $param = $this->param;
-
- $manager = new SeasonTicketContractSelectionManager($param->selectionRecordNo);
-
- if (!$manager->checkHash($param->entryRecordNo, $param->fs)) {
- return $this->failedResponse();
- }
-
- if ($manager->getSelection()->status !== SelectionStatus::ENTRY_ACCEPTING) {
- throw new GeneralErrorMessageException("募集期間が終了しています");
- }
-
- $entry = $manager->getEntry($param->entryRecordNo);
-
- return $this->successResponse($entry->toArray());
- }
- }
|