-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-11-2025 a las 19:41:28
-- Versión del servidor: 10.4.32-MariaDB
-- Versión de PHP: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `db_03`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `auditlogs`
--

CREATE TABLE `auditlogs` (
  `ID` int(11) NOT NULL,
  `Tabla` varchar(100) DEFAULT NULL,
  `Operacion` varchar(20) DEFAULT NULL,
  `Fecha` datetime DEFAULT NULL,
  `Usuario` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `auditlogs`
--

INSERT INTO `auditlogs` (`ID`, `Tabla`, `Operacion`, `Fecha`, `Usuario`) VALUES
(1, 'Sucursales', 'UPDATE', '2025-11-27 15:27:16', 'system'),
(2, 'InventarioA', 'UPDATE', '2025-11-27 15:27:16', 'tester'),
(3, 'Sucursales', 'DELETE', '2025-11-27 15:27:16', 'tester'),
(4, 'Ordenes', 'SELECT', '2025-11-27 15:27:16', 'system'),
(5, 'Clientes', 'UPDATE', '2025-11-27 15:27:16', 'root'),
(6, 'Clientes', 'INSERT', '2025-11-27 15:27:16', 'admin'),
(7, 'OrdenItems', 'UPDATE', '2025-11-27 15:27:16', 'system'),
(8, 'Clientes', 'DELETE', '2025-11-27 15:27:16', 'api'),
(9, 'Ordenes', 'UPDATE', '2025-11-27 15:27:16', 'admin'),
(10, 'OrdenItems', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(11, 'Ordenes', 'INSERT', '2025-11-27 15:27:16', 'admin'),
(12, 'Sucursales', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(13, 'Sucursales', 'DELETE', '2025-11-27 15:27:16', 'root'),
(14, 'InventarioB', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(15, 'InventarioB', 'DELETE', '2025-11-27 15:27:16', 'api'),
(16, 'InventarioA', 'DELETE', '2025-11-27 15:27:16', 'api'),
(17, 'OrdenItems', 'DELETE', '2025-11-27 15:27:16', 'tester'),
(18, 'PriceHistory', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(19, 'InventarioB', 'INSERT', '2025-11-27 15:27:16', 'root'),
(20, 'InventarioA', 'SELECT', '2025-11-27 15:27:16', 'root'),
(21, 'Productos', 'SELECT', '2025-11-27 15:27:16', 'admin'),
(22, 'InventarioA', 'UPDATE', '2025-11-27 15:27:16', 'tester'),
(23, 'Clientes', 'INSERT', '2025-11-27 15:27:16', 'root'),
(24, 'Transacciones', 'SELECT', '2025-11-27 15:27:16', 'api'),
(25, 'PriceHistory', 'DELETE', '2025-11-27 15:27:16', 'tester'),
(26, 'InventarioA', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(27, 'InventarioA', 'UPDATE', '2025-11-27 15:27:16', 'admin'),
(28, 'PriceHistory', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(29, 'OrdenItems', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(30, 'Ordenes', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(31, 'InventarioA', 'UPDATE', '2025-11-27 15:27:16', 'api'),
(32, 'InventarioA', 'INSERT', '2025-11-27 15:27:16', 'api'),
(33, 'Sucursales', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(34, 'Productos', 'INSERT', '2025-11-27 15:27:16', 'system'),
(35, 'PriceHistory', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(36, 'Transacciones', 'UPDATE', '2025-11-27 15:27:16', 'system'),
(37, 'InventarioB', 'UPDATE', '2025-11-27 15:27:16', 'admin'),
(38, 'InventarioA', 'INSERT', '2025-11-27 15:27:16', 'api'),
(39, 'Productos', 'SELECT', '2025-11-27 15:27:16', 'system'),
(40, 'Transacciones', 'SELECT', '2025-11-27 15:27:16', 'system'),
(41, 'Sucursales', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(42, 'Clientes', 'DELETE', '2025-11-27 15:27:16', 'root'),
(43, 'Ordenes', 'INSERT', '2025-11-27 15:27:16', 'root'),
(44, 'Ordenes', 'INSERT', '2025-11-27 15:27:16', 'api'),
(45, 'Transacciones', 'UPDATE', '2025-11-27 15:27:16', 'system'),
(46, 'Categorias', 'SELECT', '2025-11-27 15:27:16', 'root'),
(47, 'Productos', 'INSERT', '2025-11-27 15:27:16', 'api'),
(48, 'OrdenItems', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(49, 'Sucursales', 'UPDATE', '2025-11-27 15:27:16', 'admin'),
(50, 'OrdenItems', 'UPDATE', '2025-11-27 15:27:16', 'api'),
(51, 'Sucursales', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(52, 'Clientes', 'INSERT', '2025-11-27 15:27:16', 'system'),
(53, 'Transacciones', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(54, 'OrdenItems', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(55, 'OrdenItems', 'DELETE', '2025-11-27 15:27:16', 'system'),
(56, 'Ordenes', 'UPDATE', '2025-11-27 15:27:16', 'api'),
(57, 'Categorias', 'SELECT', '2025-11-27 15:27:16', 'system'),
(58, 'InventarioA', 'UPDATE', '2025-11-27 15:27:16', 'root'),
(59, 'OrdenItems', 'SELECT', '2025-11-27 15:27:16', 'admin'),
(60, 'InventarioA', 'UPDATE', '2025-11-27 15:27:16', 'tester'),
(61, 'Ordenes', 'DELETE', '2025-11-27 15:27:16', 'admin'),
(62, 'OrdenItems', 'UPDATE', '2025-11-27 15:27:16', 'api'),
(63, 'InventarioA', 'SELECT', '2025-11-27 15:27:16', 'api'),
(64, 'Sucursales', 'SELECT', '2025-11-27 15:27:16', 'api'),
(65, 'Clientes', 'INSERT', '2025-11-27 15:27:16', 'system'),
(66, 'PriceHistory', 'INSERT', '2025-11-27 15:27:16', 'root'),
(67, 'InventarioB', 'SELECT', '2025-11-27 15:27:16', 'api'),
(68, 'InventarioB', 'INSERT', '2025-11-27 15:27:16', 'root'),
(69, 'Transacciones', 'DELETE', '2025-11-27 15:27:16', 'system'),
(70, 'Transacciones', 'SELECT', '2025-11-27 15:27:16', 'system'),
(71, 'Categorias', 'SELECT', '2025-11-27 15:27:16', 'api'),
(72, 'Transacciones', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(73, 'PriceHistory', 'UPDATE', '2025-11-27 15:27:16', 'system'),
(74, 'Sucursales', 'UPDATE', '2025-11-27 15:27:16', 'system'),
(75, 'PriceHistory', 'UPDATE', '2025-11-27 15:27:16', 'root'),
(76, 'Sucursales', 'DELETE', '2025-11-27 15:27:16', 'root'),
(77, 'PriceHistory', 'DELETE', '2025-11-27 15:27:16', 'root'),
(78, 'Clientes', 'UPDATE', '2025-11-27 15:27:16', 'admin'),
(79, 'Clientes', 'DELETE', '2025-11-27 15:27:16', 'api'),
(80, 'PriceHistory', 'DELETE', '2025-11-27 15:27:16', 'api'),
(81, 'Categorias', 'SELECT', '2025-11-27 15:27:16', 'api'),
(82, 'Ordenes', 'SELECT', '2025-11-27 15:27:16', 'tester'),
(83, 'InventarioA', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(84, 'InventarioA', 'INSERT', '2025-11-27 15:27:16', 'admin'),
(85, 'PriceHistory', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(86, 'Ordenes', 'SELECT', '2025-11-27 15:27:16', 'root'),
(87, 'OrdenItems', 'SELECT', '2025-11-27 15:27:16', 'admin'),
(88, 'Productos', 'INSERT', '2025-11-27 15:27:16', 'admin'),
(89, 'PriceHistory', 'UPDATE', '2025-11-27 15:27:16', 'admin'),
(90, 'Productos', 'INSERT', '2025-11-27 15:27:16', 'tester'),
(91, 'InventarioA', 'SELECT', '2025-11-27 15:27:16', 'system'),
(92, 'Sucursales', 'SELECT', '2025-11-27 15:27:16', 'api'),
(93, 'PriceHistory', 'SELECT', '2025-11-27 15:27:16', 'system'),
(94, 'OrdenItems', 'SELECT', '2025-11-27 15:27:16', 'tester'),
(95, 'Productos', 'UPDATE', '2025-11-27 15:27:16', 'api'),
(96, 'Categorias', 'DELETE', '2025-11-27 15:27:16', 'api'),
(97, 'Transacciones', 'INSERT', '2025-11-27 15:27:16', 'system'),
(98, 'PriceHistory', 'UPDATE', '2025-11-27 15:27:16', 'root'),
(99, 'InventarioA', 'SELECT', '2025-11-27 15:27:16', 'tester'),
(100, 'Categorias', 'DELETE', '2025-11-27 15:27:16', 'system');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `categorias`
--

CREATE TABLE `categorias` (
  `CategoriaID` int(11) NOT NULL,
  `Nombre` varchar(100) DEFAULT NULL,
  `PadreID` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `categorias`
--

INSERT INTO `categorias` (`CategoriaID`, `Nombre`, `PadreID`) VALUES
(1, 'Categoria 1', NULL),
(2, 'Categoria 2', NULL),
(3, 'Categoria 3', NULL),
(4, 'Categoria 4', NULL),
(5, 'Categoria 5', NULL),
(6, 'Categoria 6', NULL),
(7, 'Categoria 7', NULL),
(8, 'Categoria 8', NULL),
(9, 'Categoria 9', NULL),
(10, 'Categoria 10', NULL),
(11, 'Categoria 11', NULL),
(12, 'Categoria 12', NULL),
(13, 'Categoria 13', NULL),
(14, 'Categoria 14', NULL),
(15, 'Categoria 15', NULL),
(16, 'Categoria 16', NULL),
(17, 'Categoria 17', NULL),
(18, 'Categoria 18', NULL),
(19, 'Categoria 19', NULL),
(20, 'Categoria 20', NULL),
(21, 'Categoria 21', 6),
(22, 'Categoria 22', 7),
(23, 'Categoria 23', 14),
(24, 'Categoria 24', 7),
(25, 'Categoria 25', 15),
(26, 'Categoria 26', 12),
(27, 'Categoria 27', 16),
(28, 'Categoria 28', 1),
(29, 'Categoria 29', 20),
(30, 'Categoria 30', 15),
(31, 'Categoria 31', 13),
(32, 'Categoria 32', 1),
(33, 'Categoria 33', 3),
(34, 'Categoria 34', 13),
(35, 'Categoria 35', 16),
(36, 'Categoria 36', 1),
(37, 'Categoria 37', 16),
(38, 'Categoria 38', 18),
(39, 'Categoria 39', 19),
(40, 'Categoria 40', 20),
(41, 'Categoria 41', 1),
(42, 'Categoria 42', 8),
(43, 'Categoria 43', 16),
(44, 'Categoria 44', 14),
(45, 'Categoria 45', 2),
(46, 'Categoria 46', 6),
(47, 'Categoria 47', 4),
(48, 'Categoria 48', 20),
(49, 'Categoria 49', 11),
(50, 'Categoria 50', 11),
(51, 'Categoria 51', 3),
(52, 'Categoria 52', 20),
(53, 'Categoria 53', 13),
(54, 'Categoria 54', 4),
(55, 'Categoria 55', 19),
(56, 'Categoria 56', 2),
(57, 'Categoria 57', 12),
(58, 'Categoria 58', 13),
(59, 'Categoria 59', 11),
(60, 'Categoria 60', 12),
(61, 'Categoria 61', 10),
(62, 'Categoria 62', 13),
(63, 'Categoria 63', 13),
(64, 'Categoria 64', 4),
(65, 'Categoria 65', 3),
(66, 'Categoria 66', 3),
(67, 'Categoria 67', 5),
(68, 'Categoria 68', 16),
(69, 'Categoria 69', 3),
(70, 'Categoria 70', 7),
(71, 'Categoria 71', 6),
(72, 'Categoria 72', 7),
(73, 'Categoria 73', 17),
(74, 'Categoria 74', 3),
(75, 'Categoria 75', 6),
(76, 'Categoria 76', 17),
(77, 'Categoria 77', 8),
(78, 'Categoria 78', 10),
(79, 'Categoria 79', 4),
(80, 'Categoria 80', 8),
(81, 'Categoria 81', 7),
(82, 'Categoria 82', 13),
(83, 'Categoria 83', 3),
(84, 'Categoria 84', 14),
(85, 'Categoria 85', 3),
(86, 'Categoria 86', 12),
(87, 'Categoria 87', 11),
(88, 'Categoria 88', 16),
(89, 'Categoria 89', 7),
(90, 'Categoria 90', 8),
(91, 'Categoria 91', 20),
(92, 'Categoria 92', 14),
(93, 'Categoria 93', 9),
(94, 'Categoria 94', 2),
(95, 'Categoria 95', 3),
(96, 'Categoria 96', 7),
(97, 'Categoria 97', 7),
(98, 'Categoria 98', 12),
(99, 'Categoria 99', 20),
(100, 'Categoria 100', 4);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `clientes`
--

CREATE TABLE `clientes` (
  `ClienteID` int(11) NOT NULL,
  `Nombre` varchar(100) DEFAULT NULL,
  `Pais` varchar(50) DEFAULT NULL,
  `Activo` tinyint(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `clientes`
--

INSERT INTO `clientes` (`ClienteID`, `Nombre`, `Pais`, `Activo`) VALUES
(1, 'Cliente 001', 'Chile', 1),
(2, 'Cliente 002', 'Colombia', 0),
(3, 'Cliente 003', 'Colombia', 1),
(4, 'Cliente 004', 'México', 0),
(5, 'Cliente 005', 'Colombia', 1),
(6, 'Cliente 006', 'México', 0),
(7, 'Cliente 007', 'Argentina', 1),
(8, 'Cliente 008', 'Argentina', 0),
(9, 'Cliente 009', 'Colombia', 0),
(10, 'Cliente 010', 'Argentina', 1),
(11, 'Cliente 011', 'Chile', 0),
(12, 'Cliente 012', 'Chile', 0),
(13, 'Cliente 013', 'España', 0),
(14, 'Cliente 014', 'España', 0),
(15, 'Cliente 015', 'Colombia', 1),
(16, 'Cliente 016', 'México', 0),
(17, 'Cliente 017', 'México', 1),
(18, 'Cliente 018', 'Chile', 0),
(19, 'Cliente 019', 'Chile', 0),
(20, 'Cliente 020', 'México', 0),
(21, 'Cliente 021', 'México', 0),
(22, 'Cliente 022', 'Colombia', 0),
(23, 'Cliente 023', 'Colombia', 0),
(24, 'Cliente 024', 'España', 0),
(25, 'Cliente 025', 'Argentina', 0),
(26, 'Cliente 026', 'México', 1),
(27, 'Cliente 027', 'Colombia', 1),
(28, 'Cliente 028', 'España', 1),
(29, 'Cliente 029', 'México', 1),
(30, 'Cliente 030', 'Colombia', 0),
(31, 'Cliente 031', 'España', 0),
(32, 'Cliente 032', 'Argentina', 1),
(33, 'Cliente 033', 'España', 0),
(34, 'Cliente 034', 'Chile', 1),
(35, 'Cliente 035', 'México', 1),
(36, 'Cliente 036', 'México', 0),
(37, 'Cliente 037', 'Chile', 1),
(38, 'Cliente 038', 'Argentina', 1),
(39, 'Cliente 039', 'España', 1),
(40, 'Cliente 040', 'Colombia', 0),
(41, 'Cliente 041', 'México', 0),
(42, 'Cliente 042', 'España', 0),
(43, 'Cliente 043', 'México', 0),
(44, 'Cliente 044', 'México', 1),
(45, 'Cliente 045', 'Chile', 0),
(46, 'Cliente 046', 'España', 0),
(47, 'Cliente 047', 'Argentina', 0),
(48, 'Cliente 048', 'España', 0),
(49, 'Cliente 049', 'Colombia', 1),
(50, 'Cliente 050', 'Chile', 0),
(51, 'Cliente 051', 'Argentina', 1),
(52, 'Cliente 052', 'España', 1),
(53, 'Cliente 053', 'Colombia', 0),
(54, 'Cliente 054', 'Colombia', 1),
(55, 'Cliente 055', 'España', 0),
(56, 'Cliente 056', 'Colombia', 0),
(57, 'Cliente 057', 'Chile', 0),
(58, 'Cliente 058', 'Chile', 1),
(59, 'Cliente 059', 'Argentina', 1),
(60, 'Cliente 060', 'Colombia', 1),
(61, 'Cliente 061', 'Chile', 0),
(62, 'Cliente 062', 'Colombia', 1),
(63, 'Cliente 063', 'España', 1),
(64, 'Cliente 064', 'Chile', 0),
(65, 'Cliente 065', 'Colombia', 0),
(66, 'Cliente 066', 'México', 0),
(67, 'Cliente 067', 'México', 0),
(68, 'Cliente 068', 'México', 0),
(69, 'Cliente 069', 'Argentina', 1),
(70, 'Cliente 070', 'Colombia', 1),
(71, 'Cliente 071', 'Colombia', 1),
(72, 'Cliente 072', 'España', 1),
(73, 'Cliente 073', 'Colombia', 1),
(74, 'Cliente 074', 'Argentina', 1),
(75, 'Cliente 075', 'España', 0),
(76, 'Cliente 076', 'Argentina', 1),
(77, 'Cliente 077', 'Argentina', 0),
(78, 'Cliente 078', 'Chile', 0),
(79, 'Cliente 079', 'España', 0),
(80, 'Cliente 080', 'España', 0),
(81, 'Cliente 081', 'Chile', 1),
(82, 'Cliente 082', 'España', 0),
(83, 'Cliente 083', 'México', 0),
(84, 'Cliente 084', 'Colombia', 0),
(85, 'Cliente 085', 'Argentina', 0),
(86, 'Cliente 086', 'Chile', 1),
(87, 'Cliente 087', 'México', 1),
(88, 'Cliente 088', 'Argentina', 1),
(89, 'Cliente 089', 'Argentina', 1),
(90, 'Cliente 090', 'Colombia', 1),
(91, 'Cliente 091', 'Argentina', 1),
(92, 'Cliente 092', 'México', 1),
(93, 'Cliente 093', 'Argentina', 1),
(94, 'Cliente 094', 'España', 1),
(95, 'Cliente 095', 'España', 1),
(96, 'Cliente 096', 'Colombia', 1),
(97, 'Cliente 097', 'Chile', 0),
(98, 'Cliente 098', 'Colombia', 1),
(99, 'Cliente 099', 'España', 1),
(100, 'Cliente 100', 'España', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `inventarioa`
--

CREATE TABLE `inventarioa` (
  `ProductoID` int(11) NOT NULL,
  `Stock` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `inventarioa`
--

INSERT INTO `inventarioa` (`ProductoID`, `Stock`) VALUES
(1, 333),
(2, 383),
(3, 417),
(4, 436),
(5, 428),
(6, 333),
(7, 380),
(8, 403),
(9, 376),
(10, 170),
(11, 224),
(12, 111),
(13, 382),
(14, 80),
(15, 252),
(16, 21),
(17, 351),
(18, 191),
(19, 402),
(20, 438),
(21, 484),
(22, 106),
(23, 77),
(24, 71),
(25, 123),
(26, 402),
(27, 142),
(28, 4),
(29, 96),
(30, 467),
(31, 50),
(32, 348),
(33, 91),
(34, 413),
(35, 292),
(36, 220),
(37, 227),
(38, 472),
(39, 183),
(40, 498),
(41, 441),
(42, 210),
(43, 231),
(44, 22),
(45, 419),
(46, 29),
(47, 387),
(48, 351),
(49, 95),
(50, 421),
(51, 321),
(52, 341),
(53, 244),
(54, 198),
(55, 260),
(56, 205),
(57, 245),
(58, 112),
(59, 323),
(60, 282),
(61, 440),
(62, 355),
(63, 456),
(64, 214),
(65, 202),
(66, 370),
(67, 242),
(68, 103),
(69, 290),
(70, 139),
(71, 326),
(72, 215),
(73, 99),
(74, 348),
(75, 445),
(76, 180),
(77, 66),
(78, 289),
(79, 247),
(80, 371),
(81, 114),
(82, 457),
(83, 443),
(84, 344),
(85, 391),
(86, 426),
(87, 458),
(88, 12),
(89, 185),
(90, 390),
(91, 398),
(92, 317),
(93, 394),
(94, 21),
(95, 421),
(96, 43),
(97, 453),
(98, 135),
(99, 315),
(100, 174);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `inventariob`
--

CREATE TABLE `inventariob` (
  `ProductoID` int(11) NOT NULL,
  `Stock` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `inventariob`
--

INSERT INTO `inventariob` (`ProductoID`, `Stock`) VALUES
(1, 424),
(2, 97),
(3, 215),
(4, 282),
(5, 268),
(6, 493),
(7, 161),
(8, 325),
(9, 146),
(10, 254),
(11, 333),
(12, 405),
(13, 23),
(14, 404),
(15, 448),
(16, 30),
(17, 308),
(18, 449),
(19, 321),
(20, 259),
(21, 335),
(22, 395),
(23, 472),
(24, 177),
(25, 467),
(26, 307),
(27, 135),
(28, 255),
(29, 370),
(30, 85),
(31, 317),
(32, 330),
(33, 199),
(34, 4),
(35, 423),
(36, 105),
(37, 256),
(38, 467),
(39, 67),
(40, 436),
(41, 477),
(42, 80),
(43, 467),
(44, 95),
(45, 75),
(46, 90),
(47, 227),
(48, 365),
(49, 142),
(50, 118),
(51, 166),
(52, 474),
(53, 373),
(54, 442),
(55, 94),
(56, 146),
(57, 445),
(58, 287),
(59, 103),
(60, 153),
(61, 458),
(62, 332),
(63, 285),
(64, 429),
(65, 289),
(66, 161),
(67, 440),
(68, 215),
(69, 256),
(70, 134),
(71, 405),
(72, 121),
(73, 391),
(74, 93),
(75, 292),
(76, 184),
(77, 41),
(78, 156),
(79, 156),
(80, 312),
(81, 93),
(82, 29),
(83, 369),
(84, 256),
(85, 174),
(86, 102),
(87, 489),
(88, 140),
(89, 232),
(90, 242),
(91, 14),
(92, 344),
(93, 178),
(94, 358),
(95, 257),
(96, 212),
(97, 289),
(98, 309),
(99, 180),
(100, 473);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `ordenes`
--

CREATE TABLE `ordenes` (
  `OrdenID` int(11) NOT NULL,
  `ClienteID` int(11) DEFAULT NULL,
  `Fecha` date DEFAULT NULL,
  `Total` decimal(10,2) DEFAULT NULL,
  `SucursalID` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `ordenes`
--

INSERT INTO `ordenes` (`OrdenID`, `ClienteID`, `Fecha`, `Total`, `SucursalID`) VALUES
(1, 256, '2023-06-10', 524.35, 12),
(2, 106, '2024-02-21', 135.02, 274),
(3, 16, '2024-06-17', 290.26, 246),
(4, 196, '2023-09-20', 71.78, 246),
(5, 291, '2024-11-07', 59.94, 283),
(6, 197, '2024-09-01', 195.54, 30),
(7, 188, '2023-08-31', 163.35, 203),
(8, 209, '2024-08-31', 140.55, 164),
(9, 54, '2025-03-14', 428.14, 3),
(10, 230, '2023-09-13', 418.78, 81),
(11, 38, '2023-08-31', 411.45, 48),
(12, 186, '2024-03-24', 157.67, 72),
(13, 162, '2023-03-18', 203.79, 175),
(14, 298, '2025-05-06', 77.33, 198),
(15, 37, '2024-02-25', 468.94, 80),
(16, 245, '2025-02-18', 532.08, 293),
(17, 293, '2023-04-20', 468.88, 100),
(18, 45, '2023-11-19', 178.74, 21),
(19, 171, '2024-03-07', 276.60, 113),
(20, 153, '2024-09-29', 346.61, 209),
(21, 207, '2024-11-26', 432.45, 218),
(22, 98, '2024-08-27', 204.97, 54),
(23, 287, '2025-03-29', 226.83, 12),
(24, 38, '2024-07-01', 148.83, 134),
(25, 189, '2023-09-13', 124.50, 98),
(26, 55, '2023-05-15', 96.96, 207),
(27, 48, '2023-12-05', 122.84, 168),
(28, 106, '2025-09-06', 230.54, 168),
(29, 211, '2023-08-20', 76.19, 232),
(30, 209, '2025-06-20', 409.55, 35),
(31, 125, '2023-11-28', 253.11, 253),
(32, 296, '2024-10-15', 91.92, 59),
(33, 215, '2025-11-27', 476.73, 80),
(34, 231, '2025-10-08', 522.61, 172),
(35, 10, '2024-09-19', 90.45, 31),
(36, 78, '2023-03-11', 144.09, 289),
(37, 74, '2024-12-16', 545.43, 275),
(38, 183, '2025-02-11', 362.79, 78),
(39, 126, '2025-01-17', 208.41, 193),
(40, 77, '2024-12-10', 549.05, 280),
(41, 201, '2024-06-08', 392.78, 245),
(42, 8, '2024-01-23', 199.16, 141),
(43, 134, '2023-08-24', 446.86, 147),
(44, 20, '2023-07-27', 90.11, 252),
(45, 284, '2025-04-29', 163.38, 150),
(46, 242, '2024-06-06', 189.64, 234),
(47, 15, '2023-05-27', 264.08, 119),
(48, 207, '2025-03-12', 168.85, 122),
(49, 95, '2024-12-03', 475.24, 53),
(50, 97, '2025-09-04', 279.78, 13),
(51, 251, '2025-10-09', 420.89, 168),
(52, 172, '2025-05-26', 154.14, 146),
(53, 241, '2024-05-24', 228.70, 39),
(54, 173, '2024-07-27', 409.18, 38),
(55, 141, '2023-04-02', 272.59, 95),
(56, 72, '2025-03-27', 306.62, 250),
(57, 184, '2024-05-13', 541.91, 69),
(58, 59, '2025-02-07', 489.16, 154),
(59, 276, '2025-09-22', 335.45, 197),
(60, 171, '2023-07-04', 389.36, 229),
(61, 232, '2024-05-03', 327.18, 16),
(62, 177, '2023-10-03', 135.56, 149),
(63, 290, '2024-12-25', 445.83, 284),
(64, 108, '2023-04-22', 388.78, 162),
(65, 196, '2024-02-19', 190.98, 141),
(66, 148, '2025-09-27', 463.45, 286),
(67, 83, '2024-06-23', 443.33, 110),
(68, 141, '2025-03-22', 471.68, 140),
(69, 240, '2024-04-17', 327.74, 3),
(70, 114, '2023-07-10', 158.22, 141),
(71, 209, '2025-09-23', 172.54, 9),
(72, 123, '2023-04-22', 314.78, 240),
(73, 120, '2024-04-10', 444.50, 47),
(74, 124, '2024-04-13', 414.62, 261),
(75, 44, '2025-07-18', 161.69, 216),
(76, 278, '2024-08-19', 326.35, 111),
(77, 55, '2023-09-13', 292.25, 2),
(78, 171, '2023-08-28', 255.45, 177),
(79, 212, '2023-10-27', 398.98, 61),
(80, 275, '2023-03-30', 109.05, 202),
(81, 1, '2023-03-08', 536.08, 263),
(82, 137, '2024-02-17', 493.08, 145),
(83, 224, '2025-02-10', 155.21, 55),
(84, 84, '2023-08-04', 248.01, 133),
(85, 6, '2023-10-19', 446.85, 198),
(86, 274, '2024-04-27', 131.71, 24),
(87, 273, '2025-02-03', 432.14, 280),
(88, 108, '2023-03-07', 505.80, 171),
(89, 32, '2023-09-02', 437.57, 127),
(90, 237, '2024-01-18', 64.66, 33),
(91, 135, '2023-05-18', 187.16, 180),
(92, 51, '2025-10-15', 407.79, 135),
(93, 27, '2025-08-22', 162.47, 250),
(94, 146, '2023-05-13', 145.45, 51),
(95, 79, '2023-09-11', 178.58, 259),
(96, 159, '2025-09-23', 420.89, 154),
(97, 100, '2025-07-31', 352.00, 199),
(98, 151, '2024-06-27', 93.89, 266),
(99, 47, '2025-07-20', 141.72, 158),
(100, 24, '2023-09-11', 456.04, 191);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `ordenitems`
--

CREATE TABLE `ordenitems` (
  `ItemID` int(11) NOT NULL,
  `OrdenID` int(11) DEFAULT NULL,
  `ProductoID` int(11) DEFAULT NULL,
  `Cantidad` int(11) DEFAULT NULL,
  `Total` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `ordenitems`
--

INSERT INTO `ordenitems` (`ItemID`, `OrdenID`, `ProductoID`, `Cantidad`, `Total`) VALUES
(1, 259, 217, 1, 202.68),
(2, 222, 239, 8, 100.31),
(3, 287, 125, 3, 179.06),
(4, 171, 95, 9, 81.90),
(5, 65, 2, 4, 178.69),
(6, 32, 297, 7, 46.28),
(7, 6, 167, 8, 191.56),
(8, 119, 77, 1, 145.41),
(9, 36, 171, 5, 150.03),
(10, 18, 57, 8, 71.73),
(11, 65, 47, 2, 39.60),
(12, 113, 128, 1, 164.47),
(13, 250, 251, 7, 196.55),
(14, 180, 60, 2, 83.49),
(15, 79, 60, 3, 105.06),
(16, 220, 72, 10, 63.26),
(17, 103, 273, 6, 178.82),
(18, 205, 262, 4, 201.56),
(19, 254, 108, 3, 42.22),
(20, 20, 255, 1, 144.17),
(21, 68, 34, 9, 21.65),
(22, 198, 35, 6, 139.32),
(23, 132, 78, 10, 21.71),
(24, 119, 241, 9, 152.60),
(25, 29, 99, 4, 173.82),
(26, 4, 183, 1, 48.46),
(27, 286, 53, 1, 133.36),
(28, 300, 41, 7, 206.54),
(29, 266, 142, 8, 32.69),
(30, 136, 274, 3, 73.00),
(31, 284, 233, 1, 182.72),
(32, 63, 134, 7, 148.75),
(33, 196, 52, 10, 10.59),
(34, 92, 156, 7, 175.43),
(35, 32, 15, 10, 103.27),
(36, 170, 129, 5, 201.51),
(37, 133, 100, 4, 143.87),
(38, 105, 222, 7, 13.61),
(39, 45, 208, 1, 204.83),
(40, 253, 86, 10, 145.22),
(41, 198, 81, 4, 10.15),
(42, 277, 182, 3, 109.84),
(43, 212, 11, 1, 41.42),
(44, 189, 204, 5, 101.44),
(45, 238, 177, 6, 27.84),
(46, 220, 117, 8, 121.33),
(47, 166, 28, 8, 151.21),
(48, 44, 181, 6, 28.94),
(49, 220, 113, 7, 69.50),
(50, 130, 80, 1, 84.74),
(51, 230, 213, 3, 27.08),
(52, 211, 76, 2, 14.60),
(53, 195, 51, 9, 202.74),
(54, 42, 243, 7, 146.50),
(55, 165, 209, 9, 16.58),
(56, 209, 116, 9, 11.64),
(57, 164, 209, 9, 38.46),
(58, 53, 134, 7, 39.58),
(59, 196, 246, 2, 50.80),
(60, 188, 156, 8, 208.78),
(61, 253, 69, 7, 86.47),
(62, 22, 65, 9, 139.62),
(63, 200, 113, 9, 74.11),
(64, 280, 211, 8, 101.59),
(65, 46, 115, 5, 32.91),
(66, 66, 225, 1, 50.41),
(67, 223, 29, 3, 12.94),
(68, 88, 124, 2, 145.55),
(69, 253, 54, 4, 67.07),
(70, 101, 246, 1, 205.58),
(71, 189, 65, 2, 69.91),
(72, 279, 225, 10, 118.68),
(73, 253, 174, 4, 35.37),
(74, 155, 58, 5, 109.95),
(75, 77, 232, 1, 38.96),
(76, 135, 245, 8, 45.58),
(77, 215, 15, 1, 68.12),
(78, 59, 30, 10, 64.64),
(79, 187, 89, 7, 43.37),
(80, 1, 152, 6, 29.51),
(81, 276, 93, 8, 200.59),
(82, 133, 104, 4, 202.69),
(83, 186, 63, 2, 64.47),
(84, 248, 92, 1, 84.50),
(85, 207, 96, 6, 153.20),
(86, 293, 219, 8, 91.05),
(87, 262, 42, 1, 10.28),
(88, 227, 232, 6, 142.63),
(89, 159, 195, 7, 78.00),
(90, 219, 189, 10, 190.20),
(91, 190, 136, 4, 109.15),
(92, 110, 104, 7, 22.99),
(93, 141, 43, 4, 32.91),
(94, 195, 270, 6, 17.37),
(95, 164, 185, 5, 82.79),
(96, 149, 113, 4, 179.63),
(97, 18, 223, 6, 96.39),
(98, 171, 164, 1, 101.79),
(99, 72, 246, 4, 96.91),
(100, 12, 265, 4, 184.15);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `pricehistory`
--

CREATE TABLE `pricehistory` (
  `ProductoID` int(11) DEFAULT NULL,
  `Precio` decimal(10,2) DEFAULT NULL,
  `VigenciaDesde` date DEFAULT NULL,
  `VigenciaHasta` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `pricehistory`
--

INSERT INTO `pricehistory` (`ProductoID`, `Precio`, `VigenciaDesde`, `VigenciaHasta`) VALUES
(1, 45.79, '2024-09-17', '2025-11-27'),
(2, 175.23, '2025-03-16', '2025-11-27'),
(3, 27.22, '2024-09-08', '2025-11-27'),
(4, 50.22, '2025-06-16', '2025-11-27'),
(5, 19.13, '2025-07-31', '2025-11-27'),
(6, 21.49, '2025-02-15', '2025-11-27'),
(7, 146.19, '2024-12-16', '2025-11-27'),
(8, 94.21, '2025-11-14', '2025-11-27'),
(9, 184.26, '2025-07-13', '2025-11-27'),
(10, 163.09, '2024-07-16', '2025-11-27'),
(11, 150.27, '2025-03-18', '2025-11-27'),
(12, 97.34, '2025-01-02', '2025-11-27'),
(13, 207.12, '2024-08-09', '2025-11-27'),
(14, 169.15, '2025-09-25', '2025-11-27'),
(15, 59.80, '2024-09-22', '2025-11-27'),
(16, 123.78, '2025-07-23', '2025-11-27'),
(17, 123.67, '2025-10-20', '2025-11-27'),
(18, 145.78, '2025-09-06', '2025-11-27'),
(19, 166.70, '2025-04-29', '2025-11-27'),
(20, 165.22, '2025-01-29', '2025-11-27'),
(21, 148.84, '2025-01-03', '2025-11-27'),
(22, 50.99, '2025-11-01', '2025-11-27'),
(23, 139.34, '2025-10-20', '2025-11-27'),
(24, 98.46, '2024-07-24', '2025-11-27'),
(25, 126.71, '2024-07-30', '2025-11-27'),
(26, 31.30, '2025-01-22', '2025-11-27'),
(27, 164.41, '2025-11-25', '2025-11-27'),
(28, 152.12, '2025-03-04', '2025-11-27'),
(29, 120.60, '2025-09-11', '2025-11-27'),
(30, 32.31, '2025-10-11', '2025-11-27'),
(31, 38.45, '2025-04-29', '2025-11-27'),
(32, 149.75, '2025-08-10', '2025-11-27'),
(33, 209.20, '2025-06-18', '2025-11-27'),
(34, 137.12, '2025-08-18', '2025-11-27'),
(35, 32.43, '2024-08-10', '2025-11-27'),
(36, 92.03, '2025-08-18', '2025-11-27'),
(37, 166.74, '2025-06-26', '2025-11-27'),
(38, 49.75, '2025-10-27', '2025-11-27'),
(39, 154.69, '2025-04-29', '2025-11-27'),
(40, 201.32, '2025-03-19', '2025-11-27'),
(41, 142.95, '2024-10-22', '2025-11-27'),
(42, 14.08, '2024-12-16', '2025-11-27'),
(43, 90.95, '2024-08-12', '2025-11-27'),
(44, 111.43, '2024-12-11', '2025-11-27'),
(45, 208.51, '2024-09-26', '2025-11-27'),
(46, 68.77, '2024-08-31', '2025-11-27'),
(47, 140.15, '2025-03-05', '2025-11-27'),
(48, 153.80, '2024-07-19', '2025-11-27'),
(49, 170.92, '2025-11-04', '2025-11-27'),
(50, 173.26, '2024-08-13', '2025-11-27'),
(51, 63.67, '2025-03-17', '2025-11-27'),
(52, 160.36, '2025-08-07', '2025-11-27'),
(53, 183.90, '2024-12-26', '2025-11-27'),
(54, 160.78, '2024-11-16', '2025-11-27'),
(55, 109.79, '2025-07-31', '2025-11-27'),
(56, 148.94, '2024-11-13', '2025-11-27'),
(57, 151.83, '2025-07-16', '2025-11-27'),
(58, 54.27, '2025-07-02', '2025-11-27'),
(59, 174.62, '2025-08-08', '2025-11-27'),
(60, 139.34, '2025-02-19', '2025-11-27'),
(61, 185.80, '2024-12-11', '2025-11-27'),
(62, 186.27, '2025-07-03', '2025-11-27'),
(63, 176.91, '2025-07-08', '2025-11-27'),
(64, 194.87, '2024-11-10', '2025-11-27'),
(65, 20.40, '2024-08-02', '2025-11-27'),
(66, 143.72, '2025-04-17', '2025-11-27'),
(67, 57.03, '2024-10-08', '2025-11-27'),
(68, 100.07, '2024-11-13', '2025-11-27'),
(69, 98.14, '2024-08-20', '2025-11-27'),
(70, 73.96, '2024-10-17', '2025-11-27'),
(71, 32.03, '2025-10-04', '2025-11-27'),
(72, 52.84, '2024-11-20', '2025-11-27'),
(73, 25.75, '2025-09-08', '2025-11-27'),
(74, 123.71, '2025-06-01', '2025-11-27'),
(75, 28.78, '2025-05-17', '2025-11-27'),
(76, 143.46, '2025-09-05', '2025-11-27'),
(77, 176.77, '2024-12-29', '2025-11-27'),
(78, 177.54, '2025-08-27', '2025-11-27'),
(79, 92.37, '2025-03-20', '2025-11-27'),
(80, 67.07, '2024-08-27', '2025-11-27'),
(81, 153.09, '2024-10-06', '2025-11-27'),
(82, 15.03, '2025-01-20', '2025-11-27'),
(83, 17.74, '2025-06-18', '2025-11-27'),
(84, 111.76, '2025-02-16', '2025-11-27'),
(85, 73.75, '2024-09-10', '2025-11-27'),
(86, 105.34, '2024-12-01', '2025-11-27'),
(87, 47.84, '2024-11-05', '2025-11-27'),
(88, 70.82, '2025-08-21', '2025-11-27'),
(89, 25.13, '2024-10-31', '2025-11-27'),
(90, 150.04, '2025-09-16', '2025-11-27'),
(91, 134.61, '2024-12-22', '2025-11-27'),
(92, 117.16, '2025-01-13', '2025-11-27'),
(93, 124.55, '2024-08-07', '2025-11-27'),
(94, 22.06, '2025-04-24', '2025-11-27'),
(95, 208.22, '2025-01-05', '2025-11-27'),
(96, 67.62, '2025-03-31', '2025-11-27'),
(97, 120.74, '2025-06-22', '2025-11-27'),
(98, 195.49, '2024-12-20', '2025-11-27'),
(99, 137.68, '2025-09-19', '2025-11-27'),
(100, 166.42, '2025-03-26', '2025-11-27');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `productos`
--

CREATE TABLE `productos` (
  `ProductoID` int(11) NOT NULL,
  `Nombre` varchar(100) DEFAULT NULL,
  `CategoriaID` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `productos`
--

INSERT INTO `productos` (`ProductoID`, `Nombre`, `CategoriaID`) VALUES
(1, 'Producto 1', 257),
(2, 'Producto 2', 165),
(3, 'Producto 3', 54),
(4, 'Producto 4', 72),
(5, 'Producto 5', 201),
(6, 'Producto 6', 186),
(7, 'Producto 7', 27),
(8, 'Producto 8', 177),
(9, 'Producto 9', 204),
(10, 'Producto 10', 187),
(11, 'Producto 11', 21),
(12, 'Producto 12', 147),
(13, 'Producto 13', 68),
(14, 'Producto 14', 201),
(15, 'Producto 15', 200),
(16, 'Producto 16', 98),
(17, 'Producto 17', 190),
(18, 'Producto 18', 53),
(19, 'Producto 19', 294),
(20, 'Producto 20', 114),
(21, 'Producto 21', 284),
(22, 'Producto 22', 180),
(23, 'Producto 23', 45),
(24, 'Producto 24', 287),
(25, 'Producto 25', 100),
(26, 'Producto 26', 236),
(27, 'Producto 27', 281),
(28, 'Producto 28', 97),
(29, 'Producto 29', 241),
(30, 'Producto 30', 15),
(31, 'Producto 31', 251),
(32, 'Producto 32', 11),
(33, 'Producto 33', 198),
(34, 'Producto 34', 58),
(35, 'Producto 35', 297),
(36, 'Producto 36', 108),
(37, 'Producto 37', 249),
(38, 'Producto 38', 22),
(39, 'Producto 39', 261),
(40, 'Producto 40', 37),
(41, 'Producto 41', 4),
(42, 'Producto 42', 209),
(43, 'Producto 43', 132),
(44, 'Producto 44', 32),
(45, 'Producto 45', 62),
(46, 'Producto 46', 215),
(47, 'Producto 47', 287),
(48, 'Producto 48', 191),
(49, 'Producto 49', 94),
(50, 'Producto 50', 197),
(51, 'Producto 51', 100),
(52, 'Producto 52', 211),
(53, 'Producto 53', 152),
(54, 'Producto 54', 126),
(55, 'Producto 55', 176),
(56, 'Producto 56', 200),
(57, 'Producto 57', 170),
(58, 'Producto 58', 251),
(59, 'Producto 59', 144),
(60, 'Producto 60', 265),
(61, 'Producto 61', 292),
(62, 'Producto 62', 68),
(63, 'Producto 63', 61),
(64, 'Producto 64', 101),
(65, 'Producto 65', 23),
(66, 'Producto 66', 111),
(67, 'Producto 67', 185),
(68, 'Producto 68', 292),
(69, 'Producto 69', 2),
(70, 'Producto 70', 37),
(71, 'Producto 71', 178),
(72, 'Producto 72', 177),
(73, 'Producto 73', 50),
(74, 'Producto 74', 20),
(75, 'Producto 75', 249),
(76, 'Producto 76', 285),
(77, 'Producto 77', 78),
(78, 'Producto 78', 134),
(79, 'Producto 79', 135),
(80, 'Producto 80', 274),
(81, 'Producto 81', 63),
(82, 'Producto 82', 92),
(83, 'Producto 83', 272),
(84, 'Producto 84', 183),
(85, 'Producto 85', 99),
(86, 'Producto 86', 245),
(87, 'Producto 87', 29),
(88, 'Producto 88', 8),
(89, 'Producto 89', 252),
(90, 'Producto 90', 36),
(91, 'Producto 91', 23),
(92, 'Producto 92', 8),
(93, 'Producto 93', 272),
(94, 'Producto 94', 133),
(95, 'Producto 95', 148),
(96, 'Producto 96', 43),
(97, 'Producto 97', 68),
(98, 'Producto 98', 213),
(99, 'Producto 99', 260),
(100, 'Producto 100', 59);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `sucursales`
--

CREATE TABLE `sucursales` (
  `SucursalID` int(11) NOT NULL,
  `Nombre` varchar(100) DEFAULT NULL,
  `Region` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `sucursales`
--

INSERT INTO `sucursales` (`SucursalID`, `Nombre`, `Region`) VALUES
(1, 'Sucursal 1', 'Oeste'),
(2, 'Sucursal 2', 'Sur'),
(3, 'Sucursal 3', 'Sur'),
(4, 'Sucursal 4', 'Norte'),
(5, 'Sucursal 5', 'Sur'),
(6, 'Sucursal 6', 'Norte'),
(7, 'Sucursal 7', 'Oeste'),
(8, 'Sucursal 8', 'Oeste'),
(9, 'Sucursal 9', 'Este'),
(10, 'Sucursal 10', 'Oeste'),
(11, 'Sucursal 11', 'Sur'),
(12, 'Sucursal 12', 'Oeste'),
(13, 'Sucursal 13', 'Sur'),
(14, 'Sucursal 14', 'Norte'),
(15, 'Sucursal 15', 'Sur'),
(16, 'Sucursal 16', 'Sur'),
(17, 'Sucursal 17', 'Norte'),
(18, 'Sucursal 18', 'Este'),
(19, 'Sucursal 19', 'Norte'),
(20, 'Sucursal 20', 'Oeste'),
(21, 'Sucursal 21', 'Oeste'),
(22, 'Sucursal 22', 'Este'),
(23, 'Sucursal 23', 'Norte'),
(24, 'Sucursal 24', 'Oeste'),
(25, 'Sucursal 25', 'Norte'),
(26, 'Sucursal 26', 'Oeste'),
(27, 'Sucursal 27', 'Oeste'),
(28, 'Sucursal 28', 'Oeste'),
(29, 'Sucursal 29', 'Norte'),
(30, 'Sucursal 30', 'Sur'),
(31, 'Sucursal 31', 'Oeste'),
(32, 'Sucursal 32', 'Norte'),
(33, 'Sucursal 33', 'Oeste'),
(34, 'Sucursal 34', 'Este'),
(35, 'Sucursal 35', 'Norte'),
(36, 'Sucursal 36', 'Norte'),
(37, 'Sucursal 37', 'Oeste'),
(38, 'Sucursal 38', 'Oeste'),
(39, 'Sucursal 39', 'Oeste'),
(40, 'Sucursal 40', 'Oeste'),
(41, 'Sucursal 41', 'Sur'),
(42, 'Sucursal 42', 'Norte'),
(43, 'Sucursal 43', 'Sur'),
(44, 'Sucursal 44', 'Sur'),
(45, 'Sucursal 45', 'Sur'),
(46, 'Sucursal 46', 'Oeste'),
(47, 'Sucursal 47', 'Este'),
(48, 'Sucursal 48', 'Norte'),
(49, 'Sucursal 49', 'Este'),
(50, 'Sucursal 50', 'Este'),
(51, 'Sucursal 51', 'Sur'),
(52, 'Sucursal 52', 'Este'),
(53, 'Sucursal 53', 'Oeste'),
(54, 'Sucursal 54', 'Oeste'),
(55, 'Sucursal 55', 'Sur'),
(56, 'Sucursal 56', 'Sur'),
(57, 'Sucursal 57', 'Sur'),
(58, 'Sucursal 58', 'Este'),
(59, 'Sucursal 59', 'Norte'),
(60, 'Sucursal 60', 'Norte'),
(61, 'Sucursal 61', 'Norte'),
(62, 'Sucursal 62', 'Norte'),
(63, 'Sucursal 63', 'Este'),
(64, 'Sucursal 64', 'Norte'),
(65, 'Sucursal 65', 'Sur'),
(66, 'Sucursal 66', 'Oeste'),
(67, 'Sucursal 67', 'Oeste'),
(68, 'Sucursal 68', 'Sur'),
(69, 'Sucursal 69', 'Norte'),
(70, 'Sucursal 70', 'Norte'),
(71, 'Sucursal 71', 'Norte'),
(72, 'Sucursal 72', 'Sur'),
(73, 'Sucursal 73', 'Sur'),
(74, 'Sucursal 74', 'Norte'),
(75, 'Sucursal 75', 'Sur'),
(76, 'Sucursal 76', 'Sur'),
(77, 'Sucursal 77', 'Sur'),
(78, 'Sucursal 78', 'Norte'),
(79, 'Sucursal 79', 'Este'),
(80, 'Sucursal 80', 'Norte'),
(81, 'Sucursal 81', 'Norte'),
(82, 'Sucursal 82', 'Sur'),
(83, 'Sucursal 83', 'Norte'),
(84, 'Sucursal 84', 'Norte'),
(85, 'Sucursal 85', 'Este'),
(86, 'Sucursal 86', 'Norte'),
(87, 'Sucursal 87', 'Sur'),
(88, 'Sucursal 88', 'Oeste'),
(89, 'Sucursal 89', 'Este'),
(90, 'Sucursal 90', 'Este'),
(91, 'Sucursal 91', 'Norte'),
(92, 'Sucursal 92', 'Oeste'),
(93, 'Sucursal 93', 'Sur'),
(94, 'Sucursal 94', 'Norte'),
(95, 'Sucursal 95', 'Este'),
(96, 'Sucursal 96', 'Este'),
(97, 'Sucursal 97', 'Oeste'),
(98, 'Sucursal 98', 'Sur'),
(99, 'Sucursal 99', 'Sur'),
(100, 'Sucursal 100', 'Este');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `transacciones`
--

CREATE TABLE `transacciones` (
  `ID` int(11) NOT NULL,
  `ClienteID` int(11) DEFAULT NULL,
  `Fecha` date DEFAULT NULL,
  `Monto` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Volcado de datos para la tabla `transacciones`
--

INSERT INTO `transacciones` (`ID`, `ClienteID`, `Fecha`, `Monto`) VALUES
(1, 145, '2025-03-16', 89.21),
(2, 71, '2024-12-08', 163.95),
(3, 243, '2025-04-17', 667.34),
(4, 118, '2025-11-22', 920.39),
(5, 138, '2025-04-28', 572.95),
(6, 3, '2025-07-08', 945.19),
(7, 136, '2025-06-02', 105.98),
(8, 289, '2025-05-08', 918.15),
(9, 246, '2025-07-06', 550.54),
(10, 139, '2025-03-11', 213.35),
(11, 247, '2025-05-21', 163.58),
(12, 47, '2025-07-24', 286.23),
(13, 88, '2025-04-01', 441.53),
(14, 39, '2025-07-10', 554.42),
(15, 156, '2024-12-03', 392.23),
(16, 272, '2025-06-30', 369.25),
(17, 152, '2025-06-05', 909.78),
(18, 2, '2025-07-22', 772.89),
(19, 212, '2025-08-23', 227.21),
(20, 74, '2025-04-24', 268.97),
(21, 138, '2025-05-15', 343.05),
(22, 300, '2025-11-19', 141.65),
(23, 162, '2025-08-01', 29.80),
(24, 23, '2025-07-25', 519.33),
(25, 139, '2025-02-03', 701.82),
(26, 291, '2025-02-11', 83.78),
(27, 282, '2025-05-28', 713.42),
(28, 289, '2025-03-07', 771.86),
(29, 174, '2025-04-11', 446.09),
(30, 71, '2025-01-04', 806.95),
(31, 72, '2025-01-27', 471.28),
(32, 227, '2025-06-26', 875.21),
(33, 1, '2025-06-17', 251.89),
(34, 245, '2025-07-11', 480.69),
(35, 48, '2025-06-29', 614.29),
(36, 219, '2025-01-18', 124.40),
(37, 285, '2025-06-23', 326.34),
(38, 73, '2025-08-17', 707.97),
(39, 179, '2024-12-30', 786.88),
(40, 32, '2025-09-09', 794.77),
(41, 67, '2025-02-13', 295.71),
(42, 4, '2025-09-03', 158.45),
(43, 297, '2025-05-22', 651.69),
(44, 181, '2025-10-14', 817.01),
(45, 187, '2025-03-12', 725.20),
(46, 116, '2025-02-05', 916.49),
(47, 16, '2025-05-05', 698.69),
(48, 209, '2025-06-22', 110.08),
(49, 45, '2025-06-11', 901.44),
(50, 5, '2025-06-25', 102.83),
(51, 42, '2025-06-17', 847.81),
(52, 238, '2025-06-08', 1008.34),
(53, 158, '2025-04-01', 735.99),
(54, 182, '2025-01-09', 613.97),
(55, 97, '2025-01-28', 206.27),
(56, 132, '2025-04-09', 884.59),
(57, 125, '2025-06-07', 157.93),
(58, 79, '2025-01-05', 710.61),
(59, 231, '2025-02-21', 544.34),
(60, 98, '2025-11-07', 320.50),
(61, 101, '2025-02-17', 902.65),
(62, 24, '2025-02-28', 518.66),
(63, 76, '2025-02-22', 81.43),
(64, 6, '2025-01-03', 470.24),
(65, 166, '2025-07-04', 380.98),
(66, 180, '2025-01-02', 741.67),
(67, 271, '2025-07-27', 1007.03),
(68, 277, '2025-04-05', 497.55),
(69, 133, '2025-02-17', 573.95),
(70, 133, '2025-05-11', 442.09),
(71, 139, '2025-11-13', 830.48),
(72, 281, '2025-08-28', 461.85),
(73, 138, '2024-12-09', 484.82),
(74, 126, '2025-03-16', 276.05),
(75, 52, '2025-10-26', 953.97),
(76, 121, '2025-09-15', 824.18),
(77, 126, '2025-03-27', 137.22),
(78, 170, '2025-06-08', 685.13),
(79, 274, '2025-05-09', 65.11),
(80, 169, '2025-03-29', 670.69),
(81, 77, '2025-08-03', 857.15),
(82, 68, '2025-04-17', 423.36),
(83, 51, '2025-04-10', 685.46),
(84, 128, '2025-10-13', 365.93),
(85, 108, '2025-02-24', 727.21),
(86, 80, '2025-09-13', 256.57),
(87, 169, '2025-10-21', 850.99),
(88, 254, '2025-03-08', 111.49),
(89, 86, '2025-10-05', 902.88),
(90, 292, '2025-09-10', 179.68),
(91, 46, '2025-08-18', 956.63),
(92, 255, '2025-06-22', 638.76),
(93, 239, '2025-10-15', 231.51),
(94, 210, '2025-01-17', 234.68),
(95, 146, '2025-02-14', 483.48),
(96, 290, '2025-06-22', 302.16),
(97, 32, '2025-03-26', 79.07),
(98, 82, '2025-09-21', 127.15),
(99, 295, '2025-04-28', 997.42),
(100, 41, '2025-03-02', 320.56);

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `auditlogs`
--
ALTER TABLE `auditlogs`
  ADD PRIMARY KEY (`ID`);

--
-- Indices de la tabla `categorias`
--
ALTER TABLE `categorias`
  ADD PRIMARY KEY (`CategoriaID`);

--
-- Indices de la tabla `clientes`
--
ALTER TABLE `clientes`
  ADD PRIMARY KEY (`ClienteID`);

--
-- Indices de la tabla `inventarioa`
--
ALTER TABLE `inventarioa`
  ADD PRIMARY KEY (`ProductoID`);

--
-- Indices de la tabla `inventariob`
--
ALTER TABLE `inventariob`
  ADD PRIMARY KEY (`ProductoID`);

--
-- Indices de la tabla `ordenes`
--
ALTER TABLE `ordenes`
  ADD PRIMARY KEY (`OrdenID`),
  ADD KEY `idx_ordenes_total` (`Total`);

--
-- Indices de la tabla `ordenitems`
--
ALTER TABLE `ordenitems`
  ADD PRIMARY KEY (`ItemID`);

--
-- Indices de la tabla `productos`
--
ALTER TABLE `productos`
  ADD PRIMARY KEY (`ProductoID`);

--
-- Indices de la tabla `sucursales`
--
ALTER TABLE `sucursales`
  ADD PRIMARY KEY (`SucursalID`);

--
-- Indices de la tabla `transacciones`
--
ALTER TABLE `transacciones`
  ADD PRIMARY KEY (`ID`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `auditlogs`
--
ALTER TABLE `auditlogs`
  MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `categorias`
--
ALTER TABLE `categorias`
  MODIFY `CategoriaID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `clientes`
--
ALTER TABLE `clientes`
  MODIFY `ClienteID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `ordenes`
--
ALTER TABLE `ordenes`
  MODIFY `OrdenID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `ordenitems`
--
ALTER TABLE `ordenitems`
  MODIFY `ItemID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `productos`
--
ALTER TABLE `productos`
  MODIFY `ProductoID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `sucursales`
--
ALTER TABLE `sucursales`
  MODIFY `SucursalID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT de la tabla `transacciones`
--
ALTER TABLE `transacciones`
  MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
