<?php

namespace App\Models\Shop;

use Illuminate\Database\Eloquent\Model;

class InvoicePayment extends Model
{
    protected $guarded = ['id'];

    protected $table = 'shop_invoice_payments';

    public function invoice()
    {
        return $this->belongsTo(Invoice::class);
    }

    public function scopeByInvoice($query, $invoice_id)
    {
        return $query->where('invoice_id', $invoice_id);
    }
}
