<?php

namespace App\Models;

use App\Observers\TransactionLogger;
use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Contracts\Auditable;

class SalePayment extends Model implements Auditable
{
	use \OwenIt\Auditing\Auditable;
	protected $fillable = [
	    'sale_id',
        'payment',
        'status',
        'gateway',
        'purpose',
        'created_at',
        'updated_at'
    ];
    protected static function boot()
    {
        parent::boot();
        static::observe(TransactionLogger::class);
    }
    public function sale(){
        return $this->belongsTo(Sale::class);
    }
}
