mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 03:55:07 +08:00
feat(Order): 增加订单商品名称和数量字段
- 在 Order 类中添加了 $goodsName 和 $number 字段 - 更新了 toArray 方法,包含新的商品名称和数量字段 - 调整了类属性注释,明确了 amount 字段的类型
This commit is contained in:
@@ -14,13 +14,15 @@ use Singularity\HDK\Pay\Enum\OrderStatus;
|
||||
* Powered by PhpStorm
|
||||
* Created on 2023/9/19
|
||||
*
|
||||
* @property-read string $orderNo
|
||||
* @property-read string transactionId
|
||||
* @property-read Money amount
|
||||
* @property-read OrderStatus state
|
||||
* @property-read string uid
|
||||
* @property-read string payment
|
||||
* @property-read string remark
|
||||
* @property-read string $orderNo
|
||||
* @property-read string $transactionId
|
||||
* @property-read string $goodsName
|
||||
* @property-read Money|array{'amount': int, 'currency': string} $amount
|
||||
* @property-read OrderStatus $state
|
||||
* @property-read string $uid
|
||||
* @property-read string $payment
|
||||
* @property-read string $remark
|
||||
* @property-read int $number
|
||||
*/
|
||||
class Order extends JsonResource
|
||||
{
|
||||
@@ -32,11 +34,13 @@ class Order extends JsonResource
|
||||
* @return array{
|
||||
* orderNo: string,
|
||||
* transactionId: string,
|
||||
* goodsName: string,
|
||||
* amount: Money,
|
||||
* state: OrderStatus,
|
||||
* uid: string,
|
||||
* payment: string,
|
||||
* remark: string
|
||||
* remark: string,
|
||||
* number: int
|
||||
* }
|
||||
*/
|
||||
public function toArray(): array
|
||||
|
||||
Reference in New Issue
Block a user