AppUser
Represents a user account in the P.FLEX system.Unique user identifier
Full name of the user
Login username (unique)
User role (determines permissions)Available roles:
Jefatura- Management level with full accessSupervisor- Shift and task managementAsistente- Assistant roleOperario- Production operatorEncargado- Department managerSistemas- System administrator
Whether the user account is active
Array of areas/departments assigned to the user
UserRole
Type definition for available user roles.Management role with full system access including reports, KPIs, and approvals
Shift management role with task assignment and quality validation
Assistant role with limited administrative access
Production operator with production registration access
Department manager with area-specific permissions
System administrator with full technical configuration access
RoleDefinition
Defines a role with its associated permissions.Unique role identifier
Role name (should match UserRole values)
Human-readable description of the role
Array of permission strings granted to this roleCommon permissions:
Ver Dashboard- View dashboardAprobar OTs- Approve work ordersReportes- Access reportsGestión Usuarios- User managementAsignar Tareas- Assign tasksCerrar Turno- Close shiftValidar Calidad- Validate qualityVer OTs- View work ordersRegistrar Producción- Register productionAdmin Total- Full admin access
Machine
Represents a production machine in the plant.Unique machine identifier
Machine code (e.g., IMP-01, TRQ-05, RBB-03)
Machine name
Machine type/categoryCommon types:
Impresión- Printing machinesTroquelado- Die-cutting machinesAcabado- Finishing machines (rewinders, blisters, etc.)
Physical area/location in the plant (e.g., Nave A, Nave B, Nave C, Nave D)
Current operational status
Operativa- Operational and runningMantenimiento- Under maintenanceDetenida- Stopped/haltedSin Operador- No operator assigned
Whether the machine is active in the system
SystemConfig
Global system configuration settings.Name of the first shift (e.g., “Turno Día”)
Start time of the first shift (24-hour format, e.g., “06:00”)
Name of the second shift (e.g., “Turno Noche”)
Start time of the second shift (24-hour format, e.g., “18:00”)
Number of days before password expiry to show warning
Number of days until password must be changed
Name of the production plant
Minutes of inactivity before automatic logout
Message displayed to operators (shift instructions, reminders, etc.)
AuditLog
System audit log entry for tracking user actions.Unique log entry identifier
Date and time of the action
User who performed the action
Role of the user at the time of action
System module where action occurred (e.g., SISTEMA, ACCESO, OPERACIONES, CALIDAD)
Type of action performed (e.g., Inicio de Sesión, Cierre de Sesión, Estado Máquina)
Detailed description of the action
IP address of the client
