<?php

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

use apexl\Io\modules\component\entities\componentEntity;
use apexl\Io\modules\component\entities\componentTypeEntity;
use apexl\Io\modules\component\entities\propertyEntity;
use apexl\Io\operators\entityDatabaseOperator;

class subscriptionPaymentOperator extends entityDatabaseOperator{

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

   /* public function getByCompany($companyId){
        return $this->vault->select('subscription')->fields()
            ->where('CompanyId', $companyId)
            ->execute()
            ->fetchAll();
    }

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

    public function getByCode($code){
        $subscription = $this->vault->select('subscription')->fields()
            ->where('code', $code)
            ->execute()
            ->fetchAssoc();

        return (object)$subscription;
    }

    public function getTypesForSubscription($subscriptionId){
        return $this->vault->select('subscription_types')->fields()
            ->where('SubscriptionId', $subscriptionId)
            ->execute()
            ->fetchAll();
    }

    public function getByNextBillingDate($nextBillingDate, $limit=20){
        return $this->vault
            ->select($this->dbTable)
            ->fields()
            ->where('next_billing_date', $nextBillingDate, '<=')
            ->limit($limit)
            ->execute()
            ->fetchAll();
    }
*/
   
}