Car-Repairs-Shop/app/Models/ServiceItem.php
sackey e839d40a99
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Initial commit
2025-07-30 17:15:50 +00:00

39 lines
876 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ServiceItem extends Model
{
/** @use HasFactory<\Database\Factories\ServiceItemFactory> */
use HasFactory;
protected $fillable = [
'service_order_id',
'service_name',
'description',
'category',
'labor_rate',
'estimated_hours',
'actual_hours',
'labor_cost',
'status',
'technician_notes',
];
protected $casts = [
'labor_rate' => 'decimal:2',
'estimated_hours' => 'decimal:2',
'actual_hours' => 'decimal:2',
'labor_cost' => 'decimal:2',
];
public function serviceOrder(): BelongsTo
{
return $this->belongsTo(ServiceOrder::class);
}
}