mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 03:55:07 +08:00
feat(TransactionRecord): 添加 TransactionRecord 类的 getter 方法
- 为 TransactionRecord 类添加了多个 getter 方法,以获取私有属性的值 - 新增的方法包括 getOrderNo、getUid、getPayType、getAction、getStatus、getSource、getItems、getTransactions、getRefunds、getExternal、getExternalId、getCreatedAt、getOccurredAt 和 getLastRefundedAt - 这些方法提供了对交易记录各个字段的访问能力,便于在域内和其他对象进行交互
This commit is contained in:
@@ -54,4 +54,74 @@ final class TransactionRecord extends AggregateRoot
|
||||
private readonly ?Carbon $occurredAt,
|
||||
private readonly ?Carbon $lastRefundedAt,
|
||||
) {}
|
||||
|
||||
public function getOrderNo(): string
|
||||
{
|
||||
return $this->orderNo;
|
||||
}
|
||||
|
||||
public function getUid(): string
|
||||
{
|
||||
return $this->uid;
|
||||
}
|
||||
|
||||
public function getPayType(): PayType
|
||||
{
|
||||
return $this->payType;
|
||||
}
|
||||
|
||||
public function getAction(): OrderAction
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
|
||||
public function getStatus(): OrderStatus
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
public function getSource(): string
|
||||
{
|
||||
return $this->source;
|
||||
}
|
||||
|
||||
public function getItems(): array
|
||||
{
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
public function getTransactions(): array
|
||||
{
|
||||
return $this->transactions;
|
||||
}
|
||||
|
||||
public function getRefunds(): array
|
||||
{
|
||||
return $this->refunds;
|
||||
}
|
||||
|
||||
public function getExternal(): ?array
|
||||
{
|
||||
return $this->external;
|
||||
}
|
||||
|
||||
public function getExternalId(): ?string
|
||||
{
|
||||
return $this->externalId;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): ?Carbon
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function getOccurredAt(): ?Carbon
|
||||
{
|
||||
return $this->occurredAt;
|
||||
}
|
||||
|
||||
public function getLastRefundedAt(): ?Carbon
|
||||
{
|
||||
return $this->lastRefundedAt;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user