Files
pos_heidiver/app/Models/Tela.php
T
Juan Felipe Duarte 18c43fe06f Add Gestión dashboard and update Tela stats
Introduces a new Gestión dashboard page with a stats overview widget for Tela and OrdenProduccion. Updates navigation icons for several Filament resources for better distinction. Adds a relationship between Tela and OrdenProduccion models. Refactors the telas table migration to use integer types for numeric fields instead of strings.
2026-01-17 08:22:54 -05:00

37 lines
648 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Tela extends Model
{
protected $fillable = [
'codigo',
'tipo',
'foto',
'color',
'proveedor_id',
'metros_comprados',
'metros_disponibles',
'fecha_compra',
'valor_total',
'costo_por_metro',
'observaciones',
];
protected $casts = [
'foto' => 'string',
];
public function proveedor()
{
return $this->belongsTo(Proveedor::class);
}
public function ordenesProduccion()
{
return $this->hasMany(OrdenProduccion::class);
}
}