-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `easybid`
--

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

--
-- Table structure for table `ciudades`
--

CREATE TABLE IF NOT EXISTS `ciudades` (
  `id_ciudad` int NOT NULL AUTO_INCREMENT,
  `nombre_ciudad` varchar(256) NOT NULL,
  PRIMARY KEY (`id_ciudad`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `ciudades`
--

INSERT INTO `ciudades` (`id_ciudad`, `nombre_ciudad`) VALUES
(1, 'Teguz'),
(2, 'San Pedro'),
(3, 'Yoro');

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

--
-- Table structure for table `empti`
--

CREATE TABLE IF NOT EXISTS `empti` (
  `id` int NOT NULL AUTO_INCREMENT,
  `n` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `facturacion`
--

CREATE TABLE IF NOT EXISTS `facturacion` (
  `id_factura` int NOT NULL AUTO_INCREMENT,
  `id_ofertaxempleado` int NOT NULL,
  `cantidad_cobrada` double NOT NULL,
  `comision` double NOT NULL,
  `pago_a_empleado` double NOT NULL,
  PRIMARY KEY (`id_factura`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `modulos`
--

CREATE TABLE IF NOT EXISTS `modulos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `identificador` varchar(254) NOT NULL,
  `display_name` varchar(254) NOT NULL,
  `controller` varchar(256) NOT NULL,
  `prioridad` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `modulos`
--

INSERT INTO `modulos` (`id`, `identificador`, `display_name`, `controller`, `prioridad`) VALUES
(1, 'sisusers', 'Usuarios del Sistema', 'main', 1),
(33, 'profesionesxempleados', 'Emp y Prof', 'main', 15),
(32, 'ciudades', 'Ciudades', 'main', 10),
(31, 'ofertasxempleados', 'Subastas', 'main', 4),
(29, 'paquetes', 'Paquetes', 'main', 1),
(28, 'profesiones', 'Profesiones', 'main', 9),
(27, 'facturacion', 'Facturación', 'main', 8),
(26, 'saldos', 'Saldo de Clientes', 'main', 7),
(25, 'ofertas', 'Ofertas', 'main', 6),
(24, 'clientes', 'Clientes', 'main', 1),
(23, 'empleados', 'Empleados', 'main', 2),
(22, 'modulos', 'Modulos', 'main', 3),
(21, 'roles', 'Roles', 'main', 2);

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

--
-- Table structure for table `ofertas`
--

CREATE TABLE IF NOT EXISTS `ofertas` (
  `id_oferta` int NOT NULL AUTO_INCREMENT,
  `id_cliente` int NOT NULL,
  `id_empleado` int DEFAULT NULL,
  `titulo` varchar(256) NOT NULL,
  `descripcion` varchar(2564) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `pdf` varchar(256) NOT NULL,
  `estado` int NOT NULL,
  `calificacion` int NOT NULL,
  `comentario` varchar(1024) NOT NULL,
  `monto` int NOT NULL,
  `fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id_profesion` int NOT NULL,
  `presencialremoto` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `materiales` float NOT NULL,
  `p1` varchar(1024) NOT NULL,
  `p2` varchar(1024) NOT NULL,
  `p3` varchar(1024) NOT NULL,
  PRIMARY KEY (`id_oferta`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `ofertas`
--

INSERT INTO `ofertas` (`id_oferta`, `id_cliente`, `id_empleado`, `titulo`, `descripcion`, `pdf`, `estado`, `calificacion`, `comentario`, `monto`, `fecha`, `id_profesion`, `presencialremoto`, `materiales`, `p1`, `p2`, `p3`) VALUES
(44, 10, 35, 'Jejejjee', 'Jrjejejjdnen dkdnrbfirn rle rke rlrnrjowlqkdne slnbf dlskf ldldkdkd dldl eken eld d dnkdneekne enmene ', '', 2, 5, '0', 300, '2025-01-04 17:14:46', 3, 'Presencial', 0, 'upload-98f12a6b88c981de.png', 'upload-b6d72a6b88c981de', 'upload-c81e2a6b88c981de.png'),
(45, 10, NULL, 'fs sd fsd fsfw e fa gzd gzdfg r', ' eagr gseahszft sr hzdh eah geah gzdh aeh eah rgade hzdsfh dsaheahresa wesar dszrfg srth rhsrth sftg gsrfyjtxfhgahyy th sth xcghsrytjxgfjsrytj jy dyj dstyj dstyj sytj sthj dsyjdtj drhg dsyrt dguyk jdyth jdtfyj dygt jdstyj dsytnxgfh jsytjgchyjdty jxhv jydtd.', '', 1, 0, '', 0, '2025-01-04 17:28:04', 2, 'Remoto', 0, '', '', ''),
(46, 10, NULL, 'Una app', 'Skin and beauty', 'Cotizacion_Skin_and_Beauty-c51c42b89230c06f.pdf', 1, 0, '', 0, '2025-01-06 03:17:44', 3, 'Remoto', 0, '', 'upload-98f12a6b88c981de.png', ''),
(47, 10, NULL, '0', '0', '', 1, 0, '', 0, '2025-01-06 14:14:12', 0, '0', 0, '', '', '');

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

--
-- Table structure for table `ofertasxempleados`
--

CREATE TABLE IF NOT EXISTS `ofertasxempleados` (
  `id_ofertaxempleado` int NOT NULL AUTO_INCREMENT,
  `id_oferta` int NOT NULL,
  `id_empleado` int NOT NULL,
  `estado` int NOT NULL,
  `fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `bid` int NOT NULL,
  `materiales` int NOT NULL,
  PRIMARY KEY (`id_ofertaxempleado`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `ofertasxempleados`
--

INSERT INTO `ofertasxempleados` (`id_ofertaxempleado`, `id_oferta`, `id_empleado`, `estado`, `fecha`, `bid`, `materiales`) VALUES
(24, 44, 35, 2, '2025-01-04 17:16:43', 300, 300),
(25, 45, 35, 1, '2025-01-04 17:28:31', 500, 500);

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

--
-- Table structure for table `paquetes`
--

CREATE TABLE IF NOT EXISTS `paquetes` (
  `id_paquete` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(256) NOT NULL,
  `precio` int NOT NULL,
  PRIMARY KEY (`id_paquete`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `profesiones`
--

CREATE TABLE IF NOT EXISTS `profesiones` (
  `id_profesion` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`id_profesion`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `profesiones`
--

INSERT INTO `profesiones` (`id_profesion`, `nombre`) VALUES
(2, 'Diseñador Grafico'),
(3, 'Programador');

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

--
-- Table structure for table `profesionesxempleados`
--

CREATE TABLE IF NOT EXISTS `profesionesxempleados` (
  `id_profesionxempleado` int NOT NULL AUTO_INCREMENT,
  `id_empleado` int NOT NULL,
  `id_profesion` int NOT NULL,
  PRIMARY KEY (`id_profesionxempleado`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `profesionesxempleados`
--

INSERT INTO `profesionesxempleados` (`id_profesionxempleado`, `id_empleado`, `id_profesion`) VALUES
(8, 35, 3),
(7, 35, 2);

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

--
-- Table structure for table `roles`
--

CREATE TABLE IF NOT EXISTS `roles` (
  `id_rol` int NOT NULL AUTO_INCREMENT,
  `id_sis_user` int NOT NULL,
  `id_modulo` int NOT NULL,
  PRIMARY KEY (`id_rol`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id_rol`, `id_sis_user`, `id_modulo`) VALUES
(1, 3, 4),
(3, 3, 17),
(4, 4, 19),
(5, 4, 17),
(8, 6, 17);

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

--
-- Table structure for table `saldos`
--

CREATE TABLE IF NOT EXISTS `saldos` (
  `id_saldo` int NOT NULL AUTO_INCREMENT,
  `id_empleado` int NOT NULL,
  `monto` int NOT NULL,
  `fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_saldo`)
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `saldos`
--

INSERT INTO `saldos` (`id_saldo`, `id_empleado`, `monto`, `fecha`) VALUES
(35, 35, 100000, '2025-01-04 17:16:32'),
(36, 35, -300, '2025-01-04 17:17:44');
COMMIT;

