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

40 lines
1.3KB

  1. <?php
  2. namespace App\Http\Controllers\Web\Custom\HelloTechno;
  3. use App\Http\Controllers\Web\BaseParam;
  4. use App\Models\ReceiptIssuingOrder;
  5. use App\Models\ReceiptIssuingHTParkingCustomOrder as HT;
  6. use App\Models\ReceiptIssuingOrderTax;
  7. use App\Rules\PhoneNumber;
  8. use Carbon\Carbon;
  9. /**
  10. * @property string $customerCode
  11. * @property string $parkingManagementCode
  12. * @property int $adjustSeqNo
  13. * @property Carbon $receiptUseDate
  14. * @property int $receiptAmount
  15. * @property ?string $memo
  16. * @property string $smsPhoneNumber
  17. * @property int $taxAmount
  18. */
  19. class CreateReceiptIssuingOrderParam extends BaseParam
  20. {
  21. public function rules(): array
  22. {
  23. return [
  24. HT::COL_NAME_CUSTOMER_CODE => $this->str(),
  25. HT::COL_NAME_PARKING_MANAGEMENT_CODE => $this->str(),
  26. HT::COL_NAME_ADJUST_SEQ_NO => $this->numeric(true),
  27. ReceiptIssuingOrder::COL_NAME_RECEIPT_USE_DATE => $this->date(),
  28. ReceiptIssuingOrder::COL_NAME_RECEIPT_AMOUNT => $this->numeric(['min:0', 'max:999999']),
  29. ReceiptIssuingOrder::COL_NAME_MEMO => $this->text(true),
  30. ReceiptIssuingOrder::COL_NAME_SMS_PHONE_NUMBER => $this->str([new PhoneNumber()]),
  31. ReceiptIssuingOrderTax::COL_NAME_TAX_AMOUNT => $this->numeric(),
  32. ];
  33. }
  34. }