-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into dev-ks/friend-checkin
# Conflicts: # app/Http/Controllers/API/v1/SettingsController.php # app/Http/Controllers/API/v1/TransportController.php # app/Models/User.php # resources/views/includes/status.blade.php # storage/api-docs/api-docs.json
- Loading branch information
Showing
139 changed files
with
6,587 additions
and
2,843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Internal; | ||
|
||
use App\Enum\Business; | ||
use App\Enum\StatusVisibility; | ||
use App\Models\Event; | ||
use App\Models\Station; | ||
use App\Models\Trip; | ||
use Carbon\Carbon; | ||
use Illuminate\Contracts\Auth\Authenticatable; | ||
|
||
class CheckInRequestDto | ||
{ | ||
public Authenticatable $user; | ||
public Trip $trip; | ||
public Station $origin; | ||
public Carbon $departure; | ||
public Station $destination; | ||
public Carbon $arrival; | ||
public Business $travelReason; | ||
public StatusVisibility $statusVisibility; | ||
public ?string $body; | ||
public ?Event $event; | ||
public bool $forceFlag; | ||
public bool $postOnMastodonFlag; | ||
public bool $chainFlag; | ||
|
||
public function __construct() { | ||
$this->travelReason = Business::PRIVATE; | ||
$this->statusVisibility = StatusVisibility::PUBLIC; | ||
$this->body = null; | ||
$this->event = null; | ||
$this->forceFlag = false; | ||
$this->postOnMastodonFlag = false; | ||
$this->chainFlag = false; | ||
} | ||
|
||
public function setUser(Authenticatable $user): CheckInRequestDto { | ||
$this->user = $user; | ||
return $this; | ||
} | ||
|
||
public function setTrip(Trip $trip): CheckInRequestDto { | ||
$this->trip = $trip; | ||
return $this; | ||
} | ||
|
||
public function setOrigin(Station $origin): CheckInRequestDto { | ||
$this->origin = $origin; | ||
return $this; | ||
} | ||
|
||
public function setDeparture(Carbon $departure): CheckInRequestDto { | ||
$this->departure = $departure; | ||
return $this; | ||
} | ||
|
||
public function setDestination(Station $destination): CheckInRequestDto { | ||
$this->destination = $destination; | ||
return $this; | ||
} | ||
|
||
public function setArrival(Carbon $arrival): CheckInRequestDto { | ||
$this->arrival = $arrival; | ||
return $this; | ||
} | ||
|
||
public function setTravelReason(Business $travelReason): CheckInRequestDto { | ||
$this->travelReason = $travelReason; | ||
return $this; | ||
} | ||
|
||
public function setStatusVisibility(StatusVisibility $statusVisibility): CheckInRequestDto { | ||
$this->statusVisibility = $statusVisibility; | ||
return $this; | ||
} | ||
|
||
public function setBody(?string $body): CheckInRequestDto { | ||
$this->body = $body; | ||
return $this; | ||
} | ||
|
||
public function setEvent(?Event $event): CheckInRequestDto { | ||
$this->event = $event; | ||
return $this; | ||
} | ||
|
||
public function setForceFlag(bool $forceFlag): CheckInRequestDto { | ||
$this->forceFlag = $forceFlag; | ||
return $this; | ||
} | ||
|
||
public function setPostOnMastodonFlag(bool $postOnMastodonFlag): CheckInRequestDto { | ||
$this->postOnMastodonFlag = $postOnMastodonFlag; | ||
return $this; | ||
} | ||
|
||
public function setChainFlag(bool $chainFlag): CheckInRequestDto { | ||
$this->chainFlag = $chainFlag; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Internal; | ||
|
||
use App\Dto\PointCalculation; | ||
use App\Models\Status; | ||
use Illuminate\Database\Eloquent\Collection; | ||
|
||
readonly class CheckinSuccessDto | ||
{ | ||
public Status $status; | ||
public PointCalculation $pointCalculation; | ||
/** | ||
* @var Collection<Status> | ||
*/ | ||
public Collection $alsoOnThisConnection; | ||
|
||
public function __construct(Status $status, PointCalculation $pointCalculation, Collection $alsoOnThisConnection) { | ||
$this->status = $status; | ||
$this->pointCalculation = $pointCalculation; | ||
$this->alsoOnThisConnection = $alsoOnThisConnection; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.