<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class OrderPayment extends Model
{
    public $timestamps = false;

    protected $fillable = [
        'payment_id',
        'payment_log',
        'status',
        'on_hand_payment',
        'seller_payment_status',
        'total_products',
        'tax_cost',
        'total_product_tax'	,
        'user_status_paid',
        'cobon_discount'	,
        'shipping_cost',
        'on_hand_cost'	,
        'seller_commission'	,
        'total_commission'	,
        'total'	,
        'cobon_status',
        'cobon_id'	,
        'installment_id',
        'order_id'	,
    ];

    public function installment()
    {
        return $this->belongsTo(Way::class,'installment_id')->withTrashed();
    }
    public function cobon()
    {
        return $this->belongsTo(Cobon::class)->withTrashed();
    }

}
