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

42 lines
1016B

  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. const COL_NAME_SUMMARY_KEY1 = "summary_key1";
  18. const COL_NAME_SUMMARY_KEY2 = "summary_key2";
  19. protected $casts = [
  20. self::COL_NAME_PORPOSE => SMSSendPurpose::class,
  21. self::COL_NAME_SEND_DATETIME => 'datetime',
  22. ];
  23. public function getModelName(): string
  24. {
  25. return "SMS送信依頼";
  26. }
  27. public function send()
  28. {
  29. $this->save();
  30. SendSMS::dispatch($this);
  31. }
  32. }