<?php

namespace app\controller\api\shareProsperity;

use crmeb\basic\BaseController;
use app\common\repositories\shared\SharedProsperityRewardRecordRepository;

class Record extends BaseController
{
    /**
     * @return mixed
     * @author 史晨
     * @date 2026/2/9 15:52
     * 贡献值列表
     */
    public function list()
    {
        $userId = $this->request->uid();
        $data = request()->only(['status', 'page']);
        /** @var SharedProsperityRewardRecordRepository $repository */
        $repository = app()->make(SharedProsperityRewardRecordRepository::class);
        $list = $repository->getRewardList($userId, $data['status'], $data['page']);
        return app('json')->success($list);
    }
}