Files
kreios/backoffice/app/Models/PreventivoItem.php
T

28 lines
665 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class PreventivoItem extends Model
{
protected $table = 'preventivo_items';
protected $fillable = [
'preventivo_id', 'sistema', 'type', 'nome_modello', 'larghezza', 'altezza',
'quantita', 'prezzo_unitario', 'prezzo_totale', 'payload', 'immagine_path',
];
protected $casts = [
'payload' => 'array',
'prezzo_unitario' => 'decimal:2',
'prezzo_totale' => 'decimal:2',
];
public function preventivo(): BelongsTo
{
return $this->belongsTo(Preventivo::class);
}
}