Initial commit

This commit is contained in:
2026-10-31 13:24:24 +01:00
commit e6805f2245
87 changed files with 16180 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class OrderItem extends Model
{
use HasFactory;
protected $fillable = [
'order_id',
'product_id',
'product_name',
'material',
'color',
'scale',
'infill',
'quantity',
'unit_price',
'total_price',
];
protected $casts = [
'unit_price' => 'float',
'total_price' => 'float',
'quantity' => 'integer',
];
public function order(): BelongsTo
{
return $this->belongsTo(Order::class);
}
public function product(): BelongsTo
{
return $this->belongsTo(Product::class);
}
}