* @license GPL https://xxx.com * @link https://xxx.com * @ctime: 2020/3/23 9:16 */ namespace App\Repositories; use App\Models\WalletLog; class WalletLogRepository extends BaseRepository { public function __construct(WalletLog $walletLog) { $this->model = $walletLog; } public function byUserIdGetWalletLog($user_id){ $data = $this->model ->where('user_id',$user_id) ->whereIn('type',WalletLog::$userShowTypeMaps) ->orderByDesc('id') ->paginate(); return $data; } }