<?php

namespace Modules\Vrc\Entities;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class VrcWasteDisposal extends Model
{
    protected $table = 'vrc_waste_disposals';

    protected $fillable = [
        'business_id', 'location_id', 'waste_stream_id', 'quantity', 'unit',
        'disposal_vendor', 'manifest_no', 'certificate_path', 'disposed_on',
        'repair_order_id', 'recorded_by', 'notes',
    ];

    protected $casts = [
        'quantity'    => 'decimal:3',
        'disposed_on' => 'date',
    ];

    public function stream(): BelongsTo
    {
        return $this->belongsTo(VrcWasteStream::class, 'waste_stream_id');
    }
}
