feat: Actualizacion sistema SIO Backend

- Nuevo modulo de historial de cambios (ServicioHistorial)
- Observer para tracking automatico de cambios en servicios
- Correccion de variables auxiliar en ServiciosController
- Actualizacion de configuraciones y migraciones
- Endpoint para consultar historial de cambios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
SIO Admin
2026-01-17 23:01:55 +00:00
parent 51880798ca
commit de656b70a2
362 changed files with 286 additions and 11 deletions

0
database/.gitignore vendored Normal file → Executable file
View File

0
database/factories/ModelFactory.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -14,7 +14,7 @@ class AlterTableServiciosProgresoAddEncuestaContestada extends Migration
public function up()
{
Schema::table('servicios_progreso', function (Blueprint $table) {
$table->boolean('encuesta_contestada')->default(false)->after('servicio_negativo');
$table->boolean('encuesta_contestada')->default(false);
});
}

View File

@@ -0,0 +1,50 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateServiciosHistorialTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('servicios_historial', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('servicio_det_id');
$table->unsignedInteger('usuario_id');
$table->string('campo', 100);
$table->text('valor_anterior')->nullable();
$table->text('valor_nuevo')->nullable();
$table->enum('accion', ['crear', 'actualizar', 'eliminar'])->default('actualizar');
$table->string('ip_address', 45)->nullable();
$table->timestamps();
$table->foreign('servicio_det_id')
->references('id')
->on('servicios_det')
->onDelete('cascade');
$table->foreign('usuario_id')
->references('id')
->on('users')
->onDelete('cascade');
$table->index(['servicio_det_id', 'created_at']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('servicios_historial');
}
}

0
database/seeds/CatFacturacion.php Normal file → Executable file
View File

0
database/seeds/CatMotivosEstatusSeeder.php Normal file → Executable file
View File

0
database/seeds/CatMotivosEstatusUpdateSeeder.php Normal file → Executable file
View File

0
database/seeds/CatOrigenesTableSeeder.php Normal file → Executable file
View File

0
database/seeds/ClientesTableSeeder.php Normal file → Executable file
View File

0
database/seeds/ColoresWebEstatusServicio.php Normal file → Executable file
View File

0
database/seeds/CorreosSucursalesTableSeeder.php Normal file → Executable file
View File

0
database/seeds/DatabaseSeeder.php Normal file → Executable file
View File

0
database/seeds/EstatusServiciosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/FormasPagosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/ParametrosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/PreguntasDomesticoTableSeeder.php Normal file → Executable file
View File

0
database/seeds/PreguntasEmpresarialTableSeeder.php Normal file → Executable file
View File

View File

0
database/seeds/RespuestasDomesticoTableSeeder.php Normal file → Executable file
View File

0
database/seeds/RespuestasEmpresarialTableSeeder.php Normal file → Executable file
View File

0
database/seeds/RolesTableSeeder.php Normal file → Executable file
View File

0
database/seeds/ServiciosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/SolicitudesServicioTableSeeder.php Normal file → Executable file
View File

0
database/seeds/SucursalesTableSeeder.php Normal file → Executable file
View File

0
database/seeds/TiposEmpleadosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/TiposServiciosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/TiposVehiculosTableSeeder.php Normal file → Executable file
View File

0
database/seeds/UsersTableSeeder.php Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More