38 lines
692 B
PHP
38 lines
692 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
|
|
class CotizacionItem extends Model
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
protected $table = 'cotizacion_items';
|
|
|
|
protected $fillable = [
|
|
'cotizacion_id',
|
|
'producto_id',
|
|
'cantidad',
|
|
'precio_unitario',
|
|
'descuento_porcentaje',
|
|
'descuento_monto',
|
|
'total'
|
|
];
|
|
|
|
public function cotizacion()
|
|
{
|
|
return $this->belongsTo(Cotizacion::class);
|
|
}
|
|
|
|
public function producto()
|
|
{
|
|
return $this->belongsTo(Producto::class);
|
|
}
|
|
}
|