37 lines
767 B
PHP
37 lines
767 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace wchat\wx\V3;
|
||
|
|
|
||
|
|
use JetBrains\PhpStorm\ArrayShape;
|
||
|
|
|
||
|
|
class TransferDetail
|
||
|
|
{
|
||
|
|
|
||
|
|
public function __construct(
|
||
|
|
public string $out_detail_no,
|
||
|
|
public int|float $transfer_amount,
|
||
|
|
public string $transfer_remark,
|
||
|
|
public string $openid,
|
||
|
|
public string $user_name
|
||
|
|
)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @return array
|
||
|
|
*/
|
||
|
|
#[ArrayShape(['out_detail_no' => "string", 'transfer_amount' => "float|int", 'transfer_remark' => "string", 'openid' => "string", 'user_name' => "string"])]
|
||
|
|
public function toArray(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'out_detail_no' => $this->out_detail_no,
|
||
|
|
'transfer_amount' => $this->transfer_amount,
|
||
|
|
'transfer_remark' => $this->transfer_remark,
|
||
|
|
'openid' => $this->openid,
|
||
|
|
'user_name' => $this->user_name,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|