領収証発行サービス
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.

48 lines
1.1KB

  1. <?php
  2. namespace App\Mail\Members\Subscription;
  3. use App\Mail\Members\Member;
  4. use App\Models\SeasonTicketContractSubscriptionMessage;
  5. class Reject extends Member
  6. {
  7. private string $parkName;
  8. private string $message;
  9. /**
  10. * Create a new message instance.
  11. *
  12. * @return void
  13. */
  14. public function __construct(SeasonTicketContractSubscriptionMessage $message)
  15. {
  16. $context = $this->context();
  17. $parking = $context->getParking();
  18. if ($parking === null) {
  19. throw new AppCommonException("コンテキスト不正 駐車場情報");
  20. }
  21. $this->parkName = $parking->park_name;
  22. $this->message = $message->message ?? "";
  23. }
  24. public function getTemplateName(): string
  25. {
  26. return 'mails.members.subscription.reject';
  27. }
  28. public function getSubject(): string
  29. {
  30. return '【スマートパーキングパス】申込却下のお知らせ';
  31. }
  32. public function getMemberParams(): array
  33. {
  34. return [
  35. 'parkName' => $this->parkName,
  36. 'memo' => $this->message,
  37. ];
  38. }
  39. }