aozhiwei 3f47a3eaca 1
2022-01-26 13:32:06 +08:00

39 lines
741 B
PHP

<?php
namespace models;
use mt;
use phpcommon\SqlHelper;
class Nft extends BaseModel {
public function getNftList($account)
{
$nftList = array();
SqlHelper::ormSelect(
myself()->_getMarketMysql(),
't_nft',
array(
'owner_address' => $account
),
function ($row) use(&$nftList) {
array_push($nftList, $row);
}
);
return $nftList;
}
public function getNft($tokenId)
{
$row = SqlHelper::ormSelectOne(
myself()->_getMarketMysql(),
't_nft',
array(
'token_id' => $tokenId,
)
);
return $row;
}
}