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.
37 lines
648 B
PHP
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);
|
|
}
|
|
}
|