32 lines
729 B
PHP
32 lines
729 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class OfflineOrderItem extends Model
|
|
{
|
|
use HasFactory, HasDateTimeFormatter;
|
|
|
|
protected $attributes = [
|
|
'discount_reduction_amount' => 0,
|
|
'points_deduction_amount' => 0,
|
|
];
|
|
|
|
protected $fillable = [
|
|
'order_id',
|
|
'product_category_id',
|
|
'products_total_amount',
|
|
'discount_reduction_amount',
|
|
'points_deduction_amount',
|
|
'payment_amount',
|
|
];
|
|
|
|
public function productCategory()
|
|
{
|
|
return $this->belongsTo(OfflineProductCategory::class, 'product_category_id');
|
|
}
|
|
}
|