mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 05:55:08 +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
|
* Powered by PhpStorm
|
||||||
* Created on 2023/9/19
|
* Created on 2023/9/19
|
||||||
*
|
*
|
||||||
* @property-read string $orderNo
|
* @property-read string $orderNo
|
||||||
* @property-read string transactionId
|
* @property-read string $transactionId
|
||||||
* @property-read Money amount
|
* @property-read string $goodsName
|
||||||
* @property-read OrderStatus state
|
* @property-read Money|array{'amount': int, 'currency': string} $amount
|
||||||
* @property-read string uid
|
* @property-read OrderStatus $state
|
||||||
* @property-read string payment
|
* @property-read string $uid
|
||||||
* @property-read string remark
|
* @property-read string $payment
|
||||||
|
* @property-read string $remark
|
||||||
|
* @property-read int $number
|
||||||
*/
|
*/
|
||||||
class Order extends JsonResource
|
class Order extends JsonResource
|
||||||
{
|
{
|
||||||
@@ -32,11 +34,13 @@ class Order extends JsonResource
|
|||||||
* @return array{
|
* @return array{
|
||||||
* orderNo: string,
|
* orderNo: string,
|
||||||
* transactionId: string,
|
* transactionId: string,
|
||||||
|
* goodsName: string,
|
||||||
* amount: Money,
|
* amount: Money,
|
||||||
* state: OrderStatus,
|
* state: OrderStatus,
|
||||||
* uid: string,
|
* uid: string,
|
||||||
* payment: string,
|
* payment: string,
|
||||||
* remark: string
|
* remark: string,
|
||||||
|
* number: int
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
|
|||||||
Reference in New Issue
Block a user