<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class DetalleFactura extends Model
{
    protected $table = 'detalle_factura';
    protected $primaryKey = 'id_detalle';
    public $timestamps = true;

    protected $fillable = [
        'id_factura',
        'concepto',
        'monto',
        'tipo',
    ];

    // Relación inversa
    public function factura()
    {
        return $this->belongsTo(Facturacion::class, 'id_factura');
    }
}
