<?php

namespace apexl\Io\modules\payment\entities\operators;

use apexl\Io\operators\entityDatabaseOperator;

class userCreditOperator extends entityDatabaseOperator{

    public function __construct($table, $primaryKey = 'id')
    {
        parent::__construct($table, $primaryKey);
    }

    public function getByUser($userId){
        return $this->vault->select($this->dbTable)->fields()
            ->where('user_id', $userId)
            ->execute()
            ->fetchAll();
    }

}