-- =============================================================================
-- LOGIDASH / logica_combustible — Datos de desarrollo
-- =============================================================================
-- Requisitos:
--   1. Crear la base: CREATE DATABASE logica_combustible CHARACTER SET utf8mb4;
--   2. Ejecutar primero: database/schema  (tablas + tipos_combustible 1-4)
-- Imágenes en disco: backend/uploads/  |  URL en BD: /uploads/nombre.jpg
--   3. Ejecutar este archivo en la misma base
--
-- Credenciales de prueba (password en texto plano: password123):
--   admin@logidash.hn      → admin
--   supervisor@logidash.hn → supervisor
--   operador1@logidash.hn  → operador
-- =============================================================================


TRUNCATE TABLE fotos_ordenes_combustible;
TRUNCATE TABLE sesiones_usuarios;
TRUNCATE TABLE auditoria;
TRUNCATE TABLE ordenes_combustible;
TRUNCATE TABLE conductores;
TRUNCATE TABLE vehiculos;
TRUNCATE TABLE zonas;
TRUNCATE TABLE rutas;
TRUNCATE TABLE empresas_clientes;
TRUNCATE TABLE gasolineras;
TRUNCATE TABLE usuarios;


-- Hash bcrypt de "password123" (compatible con password_verify en PHP)
SET @pwd = '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi';

-- -----------------------------------------------------------------------------
-- USUARIOS
-- -----------------------------------------------------------------------------
INSERT INTO usuarios (nombre, correo, password, rol, estado) VALUES
('Carlos Méndez',       'admin@logidash.hn',        @pwd, 'admin',      'activo'),
('María López',         'supervisor@logidash.hn',   @pwd, 'supervisor', 'activo'),
('José Ramírez',        'supervisor2@logidash.hn',  @pwd, 'supervisor', 'activo'),
('Ana Torres',          'operador1@logidash.hn',    @pwd, 'operador',   'activo'),
('Luis Herrera',        'operador2@logidash.hn',    @pwd, 'operador',   'activo'),
('Sandra Paz',          'operador3@logidash.hn',    @pwd, 'operador',   'activo'),
('Usuario Inactivo',    'inactivo@logidash.hn',     @pwd, 'operador',   'inactivo');

-- -----------------------------------------------------------------------------
-- GASOLINERAS
-- -----------------------------------------------------------------------------
INSERT INTO gasolineras (nombre, direccion, estado) VALUES
('Texaco Suyapa',              'Boulevard Suyapa, Tegucigalpa',                    'activo'),
('UNO Las Colinas',            'Col. Las Colinas, Tegucigalpa',                    'activo'),
('Puma Centro',                'Centro Cívico Gubernamental, Tegucigalpa',         'activo'),
('Texaco Comayagüela',         'Av. República de Chile, Comayagüela',              'activo'),
('UNO San Pedro Sula',         'Blvd. del Norte, San Pedro Sula',                  'activo'),
('Puma La Lima',               'Carretera a La Lima, Cortés',                      'activo'),
('Texaco Choluteca',           'Barrio El Centro, Choluteca',                      'activo'),
('UNO Danlí',                  'Entrada a Danlí, El Paraíso',                      'activo'),
('Estación El Progreso',       'Carretera CA-5, El Progreso',                      'activo'),
('Gasolinera Inactiva Test',   'Solo pruebas — no usar',                           'inactivo');

-- -----------------------------------------------------------------------------
-- EMPRESAS CLIENTES
-- -----------------------------------------------------------------------------
INSERT INTO empresas_clientes (nombre, rtn, estado) VALUES
('Transportes del Norte S.A.',     '08019900123456', 'activo'),
('Logística Express HN',           '08019900234567', 'activo'),
('Distribuidora La Ceiba',        '08019900345678', 'activo'),
('Carga Pesada Atlántida',         '08019900456789', 'activo'),
('Fletes del Sur',                 '08019900567890', 'activo'),
('Mudanzas y Rutas SPS',           '08019900678901', 'activo'),
('Corporación Minera Olancho',     '08019900789012', 'activo'),
('Agroexport Valle',               '08019900890123', 'activo'),
('Servicios Portuarios Cortés',     '08019900901234', 'activo'),
('Construcciones Metrópolis',      '08019901012345', 'activo'),
('Empresa Cliente Inactiva',       '08019909999999', 'inactivo');

-- -----------------------------------------------------------------------------
-- RUTAS
-- -----------------------------------------------------------------------------
INSERT INTO rutas (nombre, descripcion, estado) VALUES
('TGU — SPS',              'Tegucigalpa a San Pedro Sula por CA-5',           'activo'),
('TGU — La Ceiba',         'Ruta hacia la costa norte',                       'activo'),
('SPS — Puerto Cortés',    'Abastecimiento zona portuaria',                   'activo'),
('TGU — Danlí',            'Valle de Olancho',                                'activo'),
('TGU — Choluteca',        'Ruta sur',                                        'activo'),
('Comayagua — TGU',        'Tramo interurbano',                               'activo'),
('SPS — El Progreso',      'Valle de Sula',                                   'activo'),
('La Ceiba — Trujillo',    'Costa norte',                                     'activo'),
('TGU — Comayagüela',      'Ruta metropolitana local',                        'activo'),
('Ruta Inactiva Test',     'No operativa',                                    'inactivo');

-- -----------------------------------------------------------------------------
-- ZONAS
-- -----------------------------------------------------------------------------
INSERT INTO zonas (nombre, descripcion, estado) VALUES
('Francisco Morazán',      'Distrito central y alrededores',                  'activo'),
('Cortés',                 'San Pedro Sula y zona industrial',                'activo'),
('Atlántida',              'La Ceiba y puertos',                              'activo'),
('Choluteca',              'Frontera sur',                                    'activo'),
('El Paraíso',             'Danlí y oriente',                                 'activo'),
('Comayagua',              'Centro del país',                                 'activo'),
('Yoro',                   'El Progreso y valle',                             'activo'),
('Zona Metropolitana',     'TGU + Comayagüela',                               'activo');

-- -----------------------------------------------------------------------------
-- VEHÍCULOS
-- -----------------------------------------------------------------------------
INSERT INTO vehiculos (placa, marca_modelo, tipo_unidad, estado) VALUES
('HND-1001', 'Freightliner Cascadia 2022',   'Cabezal',        'activo'),
('HND-1002', 'Kenworth T680 2021',           'Cabezal',        'activo'),
('HND-1003', 'Volvo FH 2020',                'Cabezal',        'activo'),
('HND-2001', 'International ProStar',        'Cabezal',        'activo'),
('HND-2002', 'Mack Anthem 2019',             'Cabezal',        'activo'),
('HND-3001', 'Isuzu NPR 2023',               'Camión rígido',  'activo'),
('HND-3002', 'Hino 500 2022',                'Camión rígido',  'activo'),
('HND-3003', 'Fuso Canter 2021',             'Camión rígido',  'activo'),
('HND-4001', 'Ford F-350 2024',              'Pickup',         'activo'),
('HND-4002', 'Toyota Hilux 2023',            'Pickup',         'activo'),
('HND-5001', 'Mercedes Sprinter 2022',       'Van carga',      'activo'),
('HND-5002', 'Nissan Urvan 2021',            'Van carga',      'activo'),
('HND-6001', 'Trailer cisterna 40k L',       'Cisterna',       'activo'),
('HND-6002', 'Trailer plataforma',           'Plataforma',     'activo'),
('HND-7001', 'Hyundai Santa Fe 2020',        'SUV supervisión','activo'),
('HND-8001', 'Camión retirado',              'Cabezal',        'inactivo'),
('SPS-1101', 'Freightliner 2023',            'Cabezal',        'activo'),
('SPS-1102', 'Kenworth 2022',                'Cabezal',        'activo'),
('CEI-2201', 'Isuzu 2021',                   'Camión rígido',  'activo'),
('CHO-3301', 'Hino 2020',                    'Camión rígido',  'activo');

-- -----------------------------------------------------------------------------
-- CONDUCTORES
-- -----------------------------------------------------------------------------
INSERT INTO conductores (nombre, dni, telefono, id_usuario, estado) VALUES
('Pedro Antonio Flores',    '0801-1990-12345', '9999-1001', NULL, 'activo'),
('Roberto Castillo',        '0801-1988-23456', '9999-1002', NULL, 'activo'),
('Miguel Ángel Reyes',      '0801-1992-34567', '9999-1003', NULL, 'activo'),
('Francisco Javier Mejía',  '0801-1985-45678', '9999-1004', NULL, 'activo'),
('Eduardo Zelaya',          '0801-1995-56789', '9999-1005', NULL, 'activo'),
('Oscar Danilo Cruz',       '0801-1991-67890', '9999-1006', NULL, 'activo'),
('Héctor Bonilla',          '0801-1987-78901', '9999-1007', NULL, 'activo'),
('Ricardo Amaya',           '0801-1993-89012', '9999-1008', NULL, 'activo'),
('Jorge Isaías Pineda',     '0801-1989-90123', '9999-1009', NULL, 'activo'),
('Wilmer Antonio López',    '0801-1994-01234', '9999-1010', NULL, 'activo'),
('Carlos Alberto Núñez',    '0801-1986-11223', '9999-1011', NULL, 'activo'),
('Marvin Elías Soriano',    '0801-1996-22334', '9999-1012', NULL, 'activo'),
('Conductor Inactivo Test', '0801-1970-99999', '9999-0000', NULL, 'inactivo');

-- -----------------------------------------------------------------------------
-- ÓRDENES DE COMBUSTIBLE (últimos ~5 meses, varias zonas y tipos)
-- id_tipo_combustible: 1=Extra, 2=Superior, 3=Diesel, 4=Otro
-- id_usuario: 4,5,6 = operadores | 2,3 = supervisores registran algunas
-- -----------------------------------------------------------------------------
INSERT INTO ordenes_combustible (
    numero_orden, fecha_autorizacion, hora_autorizacion,
    id_gasolinera, id_empresa_cliente, id_vehiculo, id_conductor,
    id_ruta, id_zona, id_tipo_combustible, id_usuario,
    kilometraje_actual, cantidad_galones, valor_total_factura,
    foto_kilometraje, link_foto_kilometraje, foto_factura, link_foto_factura,
    confirmacion, observaciones, estado
) VALUES
-- Enero 2026
('OC-2026-0001','2026-01-05','07:15',1,1,1,1,1,1,3,4,125400,45.00,1237.50,'km_0001.jpg','/uploads/km_0001.jpg','fac_0001.jpg','/uploads/fac_0001.jpg',1,NULL,'registrada'),
('OC-2026-0002','2026-01-06','08:30',2,2,2,2,2,1,3,4,89200,52.00,1430.00,NULL,NULL,'fac_0002.jpg','/uploads/fac_0002.jpg',1,'Carga completa ruta norte','registrada'),
('OC-2026-0003','2026-01-08','14:20',3,3,7,5,3,2,2,5,45600,28.50,912.00,'km_0003.jpg','/uploads/km_0003.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0004','2026-01-10','09:45',1,4,3,3,4,5,3,4,201300,60.00,1650.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0005','2026-01-12','11:00',4,5,11,7,5,4,1,6,18900,15.00,480.00,'km_0005.jpg','/uploads/km_0005.jpg','fac_0005.jpg','/uploads/fac_0005.jpg',1,'Pickup supervisión','registrada'),
('OC-2026-0006','2026-01-15','16:30',5,6,17,9,6,2,3,5,178900,48.00,1320.00,NULL,NULL,'fac_0006.jpg','/uploads/fac_0006.jpg',1,NULL,'registrada'),
('OC-2026-0007','2026-01-18','06:50',2,1,4,4,1,8,3,4,156700,55.00,1512.50,'km_0007.jpg','/uploads/km_0007.jpg','fac_0007.jpg','/uploads/fac_0007.jpg',1,NULL,'registrada'),
('OC-2026-0008','2026-01-20','13:10',3,7,13,10,7,7,3,2,342100,72.00,1980.00,NULL,NULL,NULL,NULL,1,'Cisterna minería','registrada'),
('OC-2026-0009','2026-01-22','10:25',1,8,8,6,8,3,3,4,67800,40.00,1100.00,'km_0009.jpg','/uploads/km_0009.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0010','2026-01-25','15:40',6,9,18,11,3,2,3,5,94500,50.00,1375.00,NULL,NULL,'fac_0010.jpg','/uploads/fac_0010.jpg',1,NULL,'registrada'),
('OC-2026-0011','2026-01-28','08:00',2,10,5,8,9,8,2,4,112300,35.00,1120.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0012','2026-01-30','12:15',4,2,6,5,2,1,3,5,52300,42.00,1155.00,'km_0012.jpg','/uploads/km_0012.jpg','fac_0012.jpg','/uploads/fac_0012.jpg',1,NULL,'registrada'),
-- Febrero 2026
('OC-2026-0013','2026-02-02','07:30',1,1,1,1,1,1,3,4,126100,44.00,1210.00,NULL,NULL,'fac_0013.jpg','/uploads/fac_0013.jpg',1,NULL,'registrada'),
('OC-2026-0014','2026-02-04','09:00',3,3,19,12,8,3,3,6,23400,38.00,1045.00,'km_0014.jpg','/uploads/km_0014.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0015','2026-02-06','14:45',5,4,2,2,6,2,3,5,90100,53.00,1457.50,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0016','2026-02-08','11:20',2,5,12,8,5,4,1,4,19200,18.00,576.00,'km_0016.jpg','/uploads/km_0016.jpg','fac_0016.jpg','/uploads/fac_0016.jpg',1,'SUV zona sur','registrada'),
('OC-2026-0017','2026-02-10','16:00',7,7,20,6,5,4,3,2,89100,65.00,1787.50,NULL,NULL,'fac_0017.jpg','/uploads/fac_0017.jpg',1,NULL,'registrada'),
('OC-2026-0018','2026-02-12','08:35',1,6,17,9,1,2,3,5,179800,49.00,1347.50,'km_0018.jpg','/uploads/km_0018.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0019','2026-02-14','10:50',4,8,9,7,2,1,3,4,68900,41.00,1127.50,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0020','2026-02-16','13:25',6,9,10,4,3,2,2,5,42100,30.00,960.00,'km_0020.jpg','/uploads/km_0020.jpg','fac_0020.jpg','/uploads/fac_0020.jpg',1,NULL,'registrada'),
('OC-2026-0021','2026-02-18','07:55',2,1,3,3,4,5,3,4,202100,58.00,1595.00,NULL,NULL,'fac_0021.jpg','/uploads/fac_0021.jpg',1,NULL,'registrada'),
('OC-2026-0022','2026-02-20','15:10',3,2,14,9,1,8,3,4,157500,54.00,1485.00,'km_0022.jpg','/uploads/km_0022.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0023','2026-02-22','09:40',1,10,7,5,10,8,3,6,46100,29.00,1015.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0024','2026-02-24','12:30',5,4,18,11,6,2,3,5,95200,51.00,1402.50,'km_0024.jpg','/uploads/km_0024.jpg','fac_0024.jpg','/uploads/fac_0024.jpg',1,NULL,'registrada'),
('OC-2026-0025','2026-02-26','17:00',2,3,8,6,8,3,3,4,68500,39.50,1086.25,NULL,NULL,NULL,NULL,0,'Pendiente confirmación supervisor','registrada'),
('OC-2026-0026','2026-02-28','08:15',4,5,11,7,5,4,1,4,19500,16.00,512.00,NULL,NULL,'fac_0026.jpg','/uploads/fac_0026.jpg',1,NULL,'registrada'),
-- Marzo 2026
('OC-2026-0027','2026-03-03','06:40',1,1,1,1,1,1,3,4,127200,46.00,1265.00,'km_0027.jpg','/uploads/km_0027.jpg','fac_0027.jpg','/uploads/fac_0027.jpg',1,NULL,'registrada'),
('OC-2026-0028','2026-03-05','10:05',3,6,17,9,7,7,3,5,180500,47.00,1292.50,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0029','2026-03-07','14:30',2,2,2,2,2,1,3,4,91000,50.00,1375.00,'km_0029.jpg','/uploads/km_0029.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0030','2026-03-09','11:45',5,7,13,10,7,5,3,2,343200,70.00,1925.00,NULL,NULL,'fac_0030.jpg','/uploads/fac_0030.jpg',1,'Alto consumo','registrada'),
('OC-2026-0031','2026-03-11','09:20',1,4,4,4,1,8,3,4,157800,56.00,1540.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0032','2026-03-13','16:50',6,8,9,7,2,3,3,4,69800,42.50,1168.75,'km_0032.jpg','/uploads/km_0032.jpg','fac_0032.jpg','/uploads/fac_0032.jpg',1,NULL,'registrada'),
('OC-2026-0033','2026-03-15','08:25',4,9,19,12,8,3,3,6,24100,36.00,990.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0034','2026-03-17','13:00',7,7,20,6,5,4,3,2,90200,64.00,1760.00,'km_0034.jpg','/uploads/km_0034.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0035','2026-03-19','07:10',2,1,3,3,4,5,3,4,203400,59.00,1622.50,NULL,NULL,'fac_0035.jpg','/uploads/fac_0035.jpg',1,NULL,'registrada'),
('OC-2026-0036','2026-03-21','15:35',3,3,7,5,3,2,2,5,46800,27.00,864.00,NULL,NULL,NULL,NULL,1,'Gasolina superior camión ligero','registrada'),
('OC-2026-0037','2026-03-23','10:40',1,10,5,8,9,8,2,4,113500,34.00,1088.00,'km_0037.jpg','/uploads/km_0037.jpg','fac_0037.jpg','/uploads/fac_0037.jpg',1,NULL,'registrada'),
('OC-2026-0038','2026-03-25','12:55',5,5,12,8,5,4,1,4,20100,17.50,560.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0039','2026-03-27','09:15',2,6,18,11,6,2,3,5,96100,52.50,1443.75,'km_0039.jpg','/uploads/km_0039.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0040','2026-03-29','17:20',4,2,6,5,2,1,3,5,53100,43.00,1182.50,NULL,NULL,'fac_0040.jpg','/uploads/fac_0040.jpg',1,NULL,'registrada'),
('OC-2026-0041','2026-03-31','08:50',1,1,1,1,10,8,3,4,128300,45.50,1251.25,NULL,NULL,NULL,NULL,1,'Ruta metropolitana','registrada'),
-- Abril 2026
('OC-2026-0042','2026-04-02','07:00',3,4,2,2,6,2,3,5,91800,54.00,1485.00,'km_0042.jpg','/uploads/km_0042.jpg','fac_0042.jpg','/uploads/fac_0042.jpg',1,NULL,'registrada'),
('OC-2026-0043','2026-04-04','11:30',1,5,11,7,5,4,1,4,20300,14.00,448.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0044','2026-04-06','14:15',6,9,10,4,3,2,3,5,43200,31.00,992.00,'km_0044.jpg','/uploads/km_0044.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0045','2026-04-08','09:45',2,8,8,6,8,3,3,4,69200,40.00,1100.00,NULL,NULL,'fac_0045.jpg','/uploads/fac_0045.jpg',1,NULL,'registrada'),
('OC-2026-0046','2026-04-10','16:25',5,6,17,9,1,2,3,5,181200,48.50,1338.75,'km_0046.jpg','/uploads/km_0046.jpg','fac_0046.jpg','/uploads/fac_0046.jpg',1,NULL,'registrada'),
('OC-2026-0047','2026-04-12','08:20',7,7,20,6,5,4,3,2,91000,66.00,1815.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0048','2026-04-14','13:50',1,1,14,9,1,8,3,4,158600,55.50,1526.25,'km_0048.jpg','/uploads/km_0048.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0049','2026-04-16','10:10',4,3,7,5,3,2,3,6,47500,28.00,980.00,NULL,NULL,'fac_0049.jpg','/uploads/fac_0049.jpg',1,NULL,'registrada'),
('OC-2026-0050','2026-04-18','15:00',3,2,2,2,2,1,3,4,92500,51.00,1402.50,'km_0050.jpg','/uploads/km_0050.jpg','fac_0050.jpg','/uploads/fac_0050.jpg',1,NULL,'registrada'),
('OC-2026-0051','2026-04-20','07:35',2,10,5,8,9,8,2,4,114200,33.00,1056.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0052','2026-04-22','12:40',1,4,3,3,4,5,3,4,204500,60.50,1663.75,'km_0052.jpg','/uploads/km_0052.jpg','fac_0052.jpg','/uploads/fac_0052.jpg',1,NULL,'registrada'),
('OC-2026-0053','2026-04-24','09:55',5,7,13,10,7,5,3,2,344500,71.00,1952.50,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0054','2026-04-26','17:45',2,1,4,4,1,8,3,4,159200,57.00,1573.25,'km_0054.jpg','/uploads/km_0054.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0055','2026-04-28','08:05',6,8,9,7,2,3,3,4,70500,41.00,1127.50,NULL,NULL,'fac_0055.jpg','/uploads/fac_0055.jpg',1,NULL,'registrada'),
('OC-2026-0056','2026-04-30','14:30',4,5,12,8,5,4,1,4,20900,16.50,528.00,'km_0056.jpg','/uploads/km_0056.jpg','fac_0056.jpg','/uploads/fac_0056.jpg',1,NULL,'registrada'),
-- Mayo 2026 (pico de actividad para gráficos)
('OC-2026-0057','2026-05-02','06:25',1,1,1,1,1,1,3,4,129400,47.00,1292.50,NULL,NULL,'fac_0057.jpg','/uploads/fac_0057.jpg',1,NULL,'registrada'),
('OC-2026-0058','2026-05-03','10:15',3,3,8,6,8,3,3,4,70100,40.50,1113.75,'km_0058.jpg','/uploads/km_0058.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0059','2026-05-05','08:40',2,2,2,2,2,1,3,4,93200,52.00,1430.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0060','2026-05-06','15:20',5,4,18,11,6,2,3,5,97000,53.00,1457.50,'km_0060.jpg','/uploads/km_0060.jpg','fac_0060.jpg','/uploads/fac_0060.jpg',1,NULL,'registrada'),
('OC-2026-0061','2026-05-07','11:05',1,6,17,9,7,7,3,5,182100,49.00,1353.75,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0062','2026-05-08','07:50',4,9,19,12,8,3,3,6,24800,37.00,1017.50,'km_0062.jpg','/uploads/km_0062.jpg','fac_0062.jpg','/uploads/fac_0062.jpg',1,NULL,'registrada'),
('OC-2026-0063','2026-05-09','13:35',7,7,20,6,5,4,3,2,92100,63.00,1732.50,NULL,NULL,'fac_0063.jpg','/uploads/fac_0063.jpg',1,NULL,'registrada'),
('OC-2026-0064','2026-05-10','09:00',2,1,3,3,4,5,3,4,205600,58.50,1604.25,'km_0064.jpg','/uploads/km_0064.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0065','2026-05-11','16:10',6,8,9,7,2,3,3,4,71200,43.50,1196.25,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0066','2026-05-12','08:30',1,5,11,7,5,4,1,4,21400,15.50,496.00,'km_0066.jpg','/uploads/km_0066.jpg','fac_0066.jpg','/uploads/fac_0066.jpg',1,NULL,'registrada'),
('OC-2026-0067','2026-05-13','14:45',3,10,7,5,10,8,3,6,47200,30.00,1050.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0068','2026-05-14','10:20',5,6,17,9,1,2,3,5,183000,50.00,1375.00,'km_0068.jpg','/uploads/km_0068.jpg','fac_0068.jpg','/uploads/fac_0068.jpg',1,NULL,'registrada'),
('OC-2026-0069','2026-05-15','07:15',2,4,2,2,6,2,3,5,92600,55.00,1512.50,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0070','2026-05-16','12:00',1,1,14,9,1,8,3,4,160300,56.00,1540.00,'km_0070.jpg','/uploads/km_0070.jpg','fac_0070.jpg','/uploads/fac_0070.jpg',1,NULL,'registrada'),
('OC-2026-0071','2026-05-17','15:30',4,3,6,5,2,1,3,5,53800,44.00,1210.00,NULL,NULL,'fac_0071.jpg','/uploads/fac_0071.jpg',1,NULL,'registrada'),
('OC-2026-0072','2026-05-18','09:40',1,7,13,10,7,5,3,2,345800,73.00,2007.50,'km_0072.jpg','/uploads/km_0072.jpg',NULL,NULL,1,'Cisterna — verificar odómetro','registrada'),
('OC-2026-0073','2026-05-19','11:25',3,2,2,2,2,1,3,4,93800,51.50,1416.25,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0074','2026-05-20','08:55',2,8,8,6,8,3,3,4,70800,39.00,1067.50,'km_0074.jpg','/uploads/km_0074.jpg','fac_0074.jpg','/uploads/fac_0074.jpg',1,NULL,'registrada'),
('OC-2026-0075','2026-05-21','16:40',6,9,10,4,3,2,3,5,44100,32.00,1024.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0076','2026-05-22','07:05',5,5,12,8,5,4,1,4,21800,18.00,576.00,'km_0076.jpg','/uploads/km_0076.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0077','2026-05-23','13:15',1,4,4,4,1,8,3,4,161100,57.50,1581.25,NULL,NULL,'fac_0077.jpg','/uploads/fac_0077.jpg',1,NULL,'registrada'),
('OC-2026-0078','2026-05-24','10:50',7,7,20,6,5,4,3,2,92800,65.50,1801.25,'km_0078.jpg','/uploads/km_0078.jpg','fac_0078.jpg','/uploads/fac_0078.jpg',1,NULL,'registrada'),
('OC-2026-0079','2026-05-25','14:00',2,10,5,8,9,8,2,4,115000,35.00,1120.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0080','2026-05-26','08:20',1,1,1,1,1,1,3,4,130100,48.00,1320.00,'km_0080.jpg','/uploads/km_0080.jpg','fac_0080.jpg','/uploads/fac_0080.jpg',1,NULL,'registrada'),
('OC-2026-0081','2026-05-27','11:45',3,6,17,9,6,2,3,5,184200,50.50,1388.75,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0082','2026-05-28','15:55',4,2,6,5,2,1,3,5,54500,42.00,1155.00,'km_0082.jpg','/uploads/km_0082.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0083','2026-05-29','09:30',5,4,18,11,6,2,3,5,97800,54.50,1498.75,NULL,NULL,'fac_0083.jpg','/uploads/fac_0083.jpg',1,NULL,'registrada'),
('OC-2026-0084','2026-05-30','17:10',1,3,7,5,3,2,2,5,48100,26.00,832.00,NULL,NULL,NULL,NULL,1,'Camión ligero — superior','registrada'),
('OC-2026-0085','2026-05-31','06:50',2,1,3,3,4,5,3,4,206700,59.50,1636.25,'km_0085.jpg','/uploads/km_0085.jpg','fac_0085.jpg','/uploads/fac_0085.jpg',1,NULL,'registrada'),
-- Junio 2026 (mes actual — datos recientes para dashboard)
('OC-2026-0086','2026-06-01','08:00',1,1,1,1,1,1,3,4,130800,46.50,1271.25,'km_0086.jpg','/uploads/km_0086.jpg','fac_0086.jpg','/uploads/fac_0086.jpg',1,NULL,'registrada'),
('OC-2026-0087','2026-06-01','14:30',3,8,9,7,2,3,3,4,71900,41.50,1136.25,NULL,NULL,'fac_0087.jpg','/uploads/fac_0087.jpg',1,NULL,'registrada'),
('OC-2026-0088','2026-06-02','07:20',2,2,2,2,2,1,3,4,94400,53.00,1457.50,'km_0088.jpg','/uploads/km_0088.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0089','2026-06-02','11:40',5,6,17,9,1,2,3,5,185100,51.00,1402.50,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0090','2026-06-02','16:15',4,5,12,8,5,4,1,4,22300,17.00,544.00,'km_0090.jpg','/uploads/km_0090.jpg','fac_0090.jpg','/uploads/fac_0090.jpg',1,NULL,'registrada'),
('OC-2026-0091','2026-06-03','08:45',1,4,4,4,1,8,3,4,162000,58.00,1595.00,'km_0091.jpg','/uploads/km_0091.jpg','fac_0091.jpg','/uploads/fac_0091.jpg',1,NULL,'registrada'),
('OC-2026-0092','2026-06-03','10:30',6,9,10,4,3,2,3,5,44800,33.00,1056.00,NULL,NULL,NULL,NULL,1,NULL,'registrada'),
('OC-2026-0093','2026-06-03','13:00',7,7,20,6,5,4,3,2,93500,64.00,1760.00,'km_0093.jpg','/uploads/km_0093.jpg',NULL,NULL,1,NULL,'registrada'),
('OC-2026-0094','2026-06-03','15:50',3,10,5,8,9,8,2,4,115800,34.50,1104.00,NULL,NULL,'fac_0094.jpg','/uploads/fac_0094.jpg',1,NULL,'registrada'),
-- Órdenes anuladas y casos especiales (filtros / alertas en dashboard)
('OC-2026-0095','2026-05-10','18:00',2,1,3,3,4,5,3,4,205600,60.00,1650.00,NULL,NULL,NULL,NULL,1,'Duplicada — error operador','anulada'),
('OC-2026-0096','2026-04-15','09:00',1,2,2,2,2,1,3,4,92000,50.00,1375.00,NULL,NULL,NULL,NULL,1,'Factura no coincidía','anulada'),
('OC-2026-0097','2026-03-20','12:00',4,6,17,9,6,2,3,5,180000,48.00,1320.00,'km_0097.jpg','/uploads/km_0097.jpg',NULL,NULL,1,'Anulada por supervisor','anulada'),
('OC-2026-0098','2026-02-05','08:00',3,3,7,5,3,2,4,5,45000,25.00,625.00,NULL,NULL,NULL,NULL,1,'Tipo combustible Otro — prueba','registrada'),
('OC-2026-0099','2026-01-14','11:30',1,1,16,1,1,1,3,2,0,0.00,0.00,NULL,NULL,NULL,NULL,1,'Vehículo inactivo — registro histórico erróneo','anulada');

-- -----------------------------------------------------------------------------
-- FOTOS ADICIONALES (tabla normalizada)
-- -----------------------------------------------------------------------------
INSERT INTO fotos_ordenes_combustible (id_orden, tipo, archivo, url_publica) VALUES
(1,  'kilometraje', 'km_0001.jpg',  '/uploads/km_0001.jpg'),
(1,  'factura',     'fac_0001.jpg', '/uploads/fac_0001.jpg'),
(2,  'factura',     'fac_0002.jpg', '/uploads/fac_0002.jpg'),
(5,  'kilometraje', 'km_0005.jpg',  '/uploads/km_0005.jpg'),
(5,  'factura',     'fac_0005.jpg', '/uploads/fac_0005.jpg'),
(7,  'kilometraje', 'km_0007.jpg',  '/uploads/km_0007.jpg'),
(7,  'factura',     'fac_0007.jpg', '/uploads/fac_0007.jpg'),
(27, 'kilometraje', 'km_0027.jpg',  '/uploads/km_0027.jpg'),
(27, 'factura',     'fac_0027.jpg', '/uploads/fac_0027.jpg'),
(50, 'kilometraje', 'km_0050.jpg',  '/uploads/km_0050.jpg'),
(50, 'factura',     'fac_0050.jpg', '/uploads/fac_0050.jpg'),
(72, 'kilometraje', 'km_0072.jpg',  '/uploads/km_0072.jpg'),
(80, 'kilometraje', 'km_0080.jpg',  '/uploads/km_0080.jpg'),
(80, 'factura',     'fac_0080.jpg', '/uploads/fac_0080.jpg'),
(86, 'kilometraje', 'km_0086.jpg',  '/uploads/km_0086.jpg'),
(86, 'factura',     'fac_0086.jpg', '/uploads/fac_0086.jpg'),
(91, 'kilometraje', 'km_0091.jpg',  '/uploads/km_0091.jpg'),
(91, 'factura',     'fac_0091.jpg', '/uploads/fac_0091.jpg');

-- -----------------------------------------------------------------------------
-- SESIONES (tokens de desarrollo)
-- -----------------------------------------------------------------------------
INSERT INTO sesiones_usuarios (id_usuario, token, ip, dispositivo, fecha_expiracion) VALUES
(1, 'dev-token-admin-7f3a9c2e1b',      '127.0.0.1', 'Chrome / Windows — Dashboard',  DATE_ADD(NOW(), INTERVAL 30 DAY)),
(2, 'dev-token-supervisor-4d8b1a0f',   '127.0.0.1', 'Chrome / Windows — Dashboard',  DATE_ADD(NOW(), INTERVAL 30 DAY)),
(4, 'dev-token-operador-9e2c5f8a',     '192.168.1.50','Capacitor Android — App móvil', DATE_ADD(NOW(), INTERVAL 7 DAY));

-- -----------------------------------------------------------------------------
-- AUDITORÍA (historial para pantalla de logs / actividad)
-- -----------------------------------------------------------------------------
INSERT INTO auditoria (id_usuario, accion, tabla_afectada, id_registro, descripcion) VALUES
(1, 'LOGIN',           NULL,                    NULL, 'Inicio de sesión administrador'),
(4, 'CREAR_ORDEN',     'ordenes_combustible',   1,    'Registro OC-2026-0001'),
(4, 'CREAR_ORDEN',     'ordenes_combustible',   2,    'Registro OC-2026-0002'),
(2, 'ACTUALIZAR',      'ordenes_combustible',   25,   'Confirmación pendiente revisada'),
(2, 'ANULAR_ORDEN',    'ordenes_combustible',   97,   'Anulación OC-2026-0097 por discrepancia'),
(1, 'CREAR_USUARIO',   'usuarios',              6,    'Alta operador3@logidash.hn'),
(1, 'ACTUALIZAR',      'gasolineras',           10,   'Gasolinera marcada inactiva'),
(3, 'CREAR_ORDEN',     'ordenes_combustible',   98,   'Registro con tipo Otro'),
(2, 'ANULAR_ORDEN',    'ordenes_combustible',   96,   'Anulación OC-2026-0096'),
(1, 'ANULAR_ORDEN',    'ordenes_combustible',   95,   'Anulación OC-2026-0095 duplicada'),
(5, 'CREAR_ORDEN',     'ordenes_combustible',   60,   'Registro OC-2026-0060'),
(6, 'CREAR_ORDEN',     'ordenes_combustible',   87,   'Registro OC-2026-0087'),
(1, 'EXPORTAR',        'ordenes_combustible',   NULL, 'Exportación CSV mayo 2026'),
(2, 'LOGIN',           NULL,                    NULL, 'Inicio de sesión supervisor'),
(4, 'LOGOUT',          NULL,                    NULL, 'Cierre sesión operador móvil'),
(1, 'ACTUALIZAR',      'empresas_clientes',     11,   'Cliente inactivo de prueba'),
(2, 'CREAR_ORDEN',     'ordenes_combustible',   91,   'Registro OC-2026-0091 hoy'),
(1, 'BACKUP',          NULL,                    NULL, 'Respaldo manual base desarrollo');

-- =============================================================================
-- RESUMEN PARA DASHBOARD
-- =============================================================================
-- usuarios:              7  (1 admin, 2 supervisor, 3 operador, 1 inactivo)
-- gasolineras:          10  (9 activas)
-- empresas_clientes:    11  (10 activas)
-- rutas:                10  (9 activas)
-- zonas:                 8
-- vehiculos:            20  (19 activos)
-- conductores:          13  (12 activos)
-- tipos_combustible:     4  (desde schema)
-- ordenes_combustible:  99  (95 registradas, 4 anuladas)
-- fotos_ordenes:        18  registros
-- sesiones:              3
-- auditoria:            18  eventos
-- =============================================================================
