backoffice first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user