Files
Additional/app/Models/CustomOrderSpecification.php
2025-12-29 14:43:24 +02:00

43 lines
867 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CustomOrderSpecification extends Model
{
protected $fillable = [
'custom_order_id',
'length',
'width',
'height',
'print_stock_id',
'quantity',
'special_instructions',
];
protected $casts = [
'length' => 'decimal:2',
'width' => 'decimal:2',
'height' => 'decimal:2',
'quantity' => 'integer',
];
/**
* Get the custom order that owns this specification
*/
public function customOrder(): BelongsTo
{
return $this->belongsTo(CustomOrder::class);
}
/**
* Get the print stock
*/
public function printStock(): BelongsTo
{
return $this->belongsTo(PrintStock::class);
}
}