<?php
namespace App\Models\Amazon;

use Illuminate\Database\Eloquent\Model;
use DB;

class Azfinancialreport extends Model
{
    protected $dates = [''];
    protected $table = 'az_financial_reports';
    protected $connection = 'amazon';
    protected $rules = array(
        
    );
    protected $injectUniqueIdentifier = true;

    public static function GetUnProccessedData($seller_id){
      return Azfinancialreport::select('az_financial_reports.*')->where('az_financial_reports.seller_id',$seller_id)->where('az_financial_reports.process_flag','N')->whereNotNull('az_financial_reports.settlement_id')->orderBy('AvailableDate')->get();
    }
    public static function GetReportByID($seller_id,$id){
    	return Azfinancialreport::select('az_financial_reports.*')->where('az_financial_reports.seller_id',$seller_id)->where('id',$id)->get();	
    }
}
