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

39 lines
915B

  1. <?php
  2. namespace App\Models;
  3. use App\Codes\SMSSendPurpose;
  4. use App\Jobs\SMS\SendSMS;
  5. use App\Models\Feature\ContractFeature;
  6. use App\Models\Feature\ReceiptIssuingOrderFeature;
  7. use App\Models\Feature\SMSProviderFeature;
  8. class SMSSendOrder extends AppModel
  9. {
  10. use ContractFeature, ReceiptIssuingOrderFeature, SMSProviderFeature;
  11. const COL_NAME_DONE = 'done';
  12. const COL_NAME_PORPOSE = 'purpose';
  13. const COL_NAME_SEND_DATETIME = "send_datetime";
  14. const COL_NAME_COST = "cost";
  15. const COL_NAME_CONTENT = "content";
  16. const COL_NAME_PHONE_NUMBER = "phone_number";
  17. protected $casts = [
  18. self::COL_NAME_PORPOSE => SMSSendPurpose::class,
  19. self::COL_NAME_SEND_DATETIME => 'datetime',
  20. ];
  21. public function getModelName(): string
  22. {
  23. return "SMS送信依頼";
  24. }
  25. public function send()
  26. {
  27. $this->save();
  28. SendSMS::dispatch($this);
  29. }
  30. }