[积分商城]PlayX用户资产

This commit is contained in:
2026-03-20 18:10:38 +08:00
parent 05312b3417
commit 1bce279345
5 changed files with 177 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
<?php
namespace app\admin\controller\mall;
use Throwable;
use app\common\controller\Backend;
use support\Response;
use Webman\Http\Request;
/**
* PlayX 用户资产(后台列表)
*/
class PlayxUserAsset extends Backend
{
/**
* @var object|null
* @phpstan-var \app\common\model\MallPlayxUserAsset|null
*/
protected ?object $model = null;
protected array|string $preExcludeFields = ['id', 'create_time', 'update_time'];
protected string|array $quickSearchField = ['user_id', 'username'];
protected string|array $indexField = [
'id',
'user_id',
'username',
'locked_points',
'available_points',
'today_limit',
'today_claimed',
'today_limit_date',
'create_time',
'update_time',
];
public function initialize(): void
{
parent::initialize();
$this->model = new \app\common\model\MallPlayxUserAsset();
}
/**
* 查看
* @throws Throwable
*/
public function index(Request $request): Response
{
$response = $this->initializeBackend($request);
if ($response !== null) {
return $response;
}
return $this->_index();
}
}

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace app\common\model;
use support\think\Model;
/**
* PlayX 用户资产
*/
class MallPlayxUserAsset extends Model
{
protected string $name = 'mall_playx_user_asset';
protected bool $autoWriteTimestamp = true;
protected array $type = [
'create_time' => 'integer',
'update_time' => 'integer',
'locked_points' => 'integer',
'available_points' => 'integer',
'today_limit' => 'integer',
'today_claimed' => 'integer',
];
}