feat(Order): 增加订单商品名称和数量字段

- 在 Order 类中添加了 $goodsName 和 $number 字段
- 更新了 toArray 方法,包含新的商品名称和数量字段
- 调整了类属性注释,明确了 amount 字段的类型
This commit is contained in:
李东云
2024-12-09 16:19:33 +08:00
parent 047b0ce67a
commit 427b6cd7af

View File

@@ -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