<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class OrderPackageItem extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
     	'type',
     	'qty',
     	'sub_total',
     	'discount_amount',
     	'discount_percentage',
     	'tax_amount',
     	'tax_percentage',
     	'grand_total',
     	'order_id',
     	'product_id',
     	'date_id',
    ];

    public function product()
    {
        return $this->belongsTo(Product::class, 'product_id', 'id');
    }
}
