汇付SDK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hfpay-lib/src/factory/object/trade/ObjectInfo.php

65 lines
1.8 KiB

<?php
namespace Tansilu\HfPayLib\factory\object\trade;
use JsonSerializable;
/**
* 藏品信息
*
* @property string $objectType 藏品系列
* @property string $objectName 藏品名称
* @property string $objectTime 上架时间
* @property int $marketType 藏品交易市场类型
* @property string $objectAddr 藏品合约地址
* @property string $chainBelong 藏品认证网络
* @property string $chainId 藏品tokenId
* @property string $objectStandard 藏品区块链合约标准
* @property string $objectTransactions 藏品交易记录
* @property string $objectIssuerName 发行方名称
* @property string $regMobileNo 买家注册手机号
* @property string $regDate 买家注册时间
* @property string $regIpAddr 买家注册ip地址
* @property string $regCertId 买家注册证件号
* @property string $regCustId 买家注册用户ID
*
*/
class ObjectInfo implements JsonSerializable
{
public static function make(int $marketType): self
{
$self = new self();
$self->marketType = $marketType;
return $self;
}
private array $data = [];
public function __get($name)
{
if(array_key_exists($name, $this->data)) {
return $this->data[$name];
}
return null;
}
public function __set($name, $value)
{
$this->data[$name] = $value;
}
public function __toString()
{
return $this->toJSON();
}
public function toJSON(): string
{
return json_encode($this->data, JSON_UNESCAPED_UNICODE);
}
public function jsonSerialize(): array
{
return $this->data;
}
}