/*
 Navicat Premium Data Transfer

 Source Server         : local
 Source Server Type    : MySQL
 Source Server Version : 50731
 Source Host           : localhost:3306
 Source Schema         : almacen

 Target Server Type    : MySQL
 Target Server Version : 50731
 File Encoding         : 65001

 Date: 29/03/2021 10:22:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for almacen
-- ----------------------------
DROP TABLE IF EXISTS `almacen`;
CREATE TABLE `almacen`  (
  `IdAlmacen` int(11) NOT NULL AUTO_INCREMENT,
  `IdProducto` smallint(6) NULL DEFAULT NULL,
  `IdUnidadMedida` smallint(6) NULL DEFAULT NULL,
  `Stock` smallint(6) NULL DEFAULT NULL,
  PRIMARY KEY (`IdAlmacen`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for areas
-- ----------------------------
DROP TABLE IF EXISTS `areas`;
CREATE TABLE `areas`  (
  `IdArea` smallint(6) NOT NULL AUTO_INCREMENT,
  `Area` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `NomCorto` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Encargado` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Puesto` varchar(85) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdArea`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of areas
-- ----------------------------
INSERT INTO `areas` VALUES (1, 'CENTRO ESTATAL DEPORTIVO DE ALTO RENDIMIENTO', 'CEDAR', 'LIC. JORGE GABRIEL RODRÍGUEZ MÉNDEZ', 'ENCARGADO DEL DEPARTAMENTO CEDAR');
INSERT INTO `areas` VALUES (2, 'RECURSOS MATERIALES ', 'REC MAT', 'JORGE ANTONIO CUY ORTIZ ', 'JEFE DEL DEPARTAMENTO');
INSERT INTO `areas` VALUES (3, 'DIRECCION ADMINISTRATIVA ', 'ADMINISTRACION ', 'L.A.E. ERIK ANTONIO BATES CAN ', 'DIRECTOR ADMINISTRATIVO');
INSERT INTO `areas` VALUES (4, 'SECRETARIA PARTICULAR DE PRECIDENCIA ', 'SECRETARIA PARTICULAR', 'MANUEL MANSANILLA ', 'SECRETARIO PARTICULAR ');
INSERT INTO `areas` VALUES (5, 'COORDINACION DE COMUNICACION HE IMAGEN ', 'PRENSA ', 'LIC. FABIOLA ', 'JEFA DEL AREA ');
INSERT INTO `areas` VALUES (6, 'DIRECCION JURIDICA ', 'JURIDICO', 'LIC. PAZ ', 'DIRECTOR JURIDICO');
INSERT INTO `areas` VALUES (7, 'UNIDAD DE TRANSPARENCIA ', 'TRANSPARENCIA ', 'LIC. GABRIELA ', 'TITULAR DEL AREA ');
INSERT INTO `areas` VALUES (8, 'RECURSOS HUMANOS ', 'REC HUMANOS ', 'LIC. ALEX ', 'JEFE DE DEPARTAMENTO');
INSERT INTO `areas` VALUES (9, 'RECURSOS FINANCIEROS ', 'FINANCIEROS ', 'LIC. MIREYA ', 'JEFA DE DEPARTAMENTO ');
INSERT INTO `areas` VALUES (10, 'DEPARTAMENTO DE SERVICIOS GENERALES ', 'SERVICIOS GENERALES ', 'RUSSEL MANSANILLA ', 'JEFE DE DEPARTAMENTO ');
INSERT INTO `areas` VALUES (11, 'DIRECCION DE PLANEACION ', 'PLANEACION ', 'EULALIO ABURTO ', 'DIRECTOR DE PLANEACION ');
INSERT INTO `areas` VALUES (12, 'DEPARTAMENTO DE PLANEACION ', 'PLANEACION ', 'JOSE LUIS ', 'JEFE DEL DEPARTAMENTO DE PLANEACION');
INSERT INTO `areas` VALUES (13, 'DIRECCION DE DEPORTE', 'DEPORTE', 'LIC. ISABEL ', 'DIRECTORA ');
INSERT INTO `areas` VALUES (14, 'DEARTAMENTO DE EVENTOS ESPECIALES ', 'EVENTOS ESPECIALES ', 'IRMA BRITO ', 'JEFA DE DEPARTAMENTO');
INSERT INTO `areas` VALUES (15, 'DEPARTAMENTO DE TALENTOS DEPORTIVOS', 'TALENTOS ', 'ALDO BAYLON ', 'JEFE DEL DEPARTAMENTO');
INSERT INTO `areas` VALUES (16, 'DEPARTAMENTO DE DEPORTE PARA TODOS ', 'DEPORTE PARA TODOS ', 'MARIO CEBALLOS ', 'JEFE DEL DEPARTAMENTO');
INSERT INTO `areas` VALUES (17, 'DEPARTAMENTO DE FORMACION Y CAPACITACION ', 'FORMACION Y CAPACITACION ', 'BARBARA ', 'JEFA DEL DEPARTAMENTO');
INSERT INTO `areas` VALUES (18, 'CENTRO DE ALTO RENDIMIENTO CHETUMAL ', 'CEDAR ', 'JORGE RODRIGUEZ ', 'JEFE DEL DEPARTAMENTO DEL CEDAR ');

-- ----------------------------
-- Table structure for controlusuarios
-- ----------------------------
DROP TABLE IF EXISTS `controlusuarios`;
CREATE TABLE `controlusuarios`  (
  `IdControl` smallint(4) UNSIGNED NOT NULL AUTO_INCREMENT,
  `IdUsuario` smallint(4) UNSIGNED NOT NULL DEFAULT 0,
  `Descripcion` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Fecha` date NOT NULL,
  `Hora` time(0) NOT NULL DEFAULT '00:00:00',
  `IP` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Tabla` varchar(30) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Clave` varchar(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`IdControl`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of controlusuarios
-- ----------------------------
INSERT INTO `controlusuarios` VALUES (1, 2, 'REGISTR&Oacute; : ', '2020-10-31', '17:51:21', '', 'grupos', '1');
INSERT INTO `controlusuarios` VALUES (2, 2, 'REGISTR&Oacute; : Material y equipo de oficina', '2020-10-31', '17:52:14', '', 'grupos', '1');
INSERT INTO `controlusuarios` VALUES (3, 2, 'REGISTR&Oacute; : Material de Limpieza', '2020-10-31', '18:27:23', '', 'grupos', '2');
INSERT INTO `controlusuarios` VALUES (4, 2, 'REGISTR&Oacute; : Material de Papelería', '2020-10-31', '18:27:41', '', 'grupos', '3');
INSERT INTO `controlusuarios` VALUES (5, 2, 'REGISTR&Oacute; : Material de Oficina', '2020-10-31', '19:19:39', '', 'grupos', '1');
INSERT INTO `controlusuarios` VALUES (6, 2, 'REGISTR&Oacute; : Hojas blancas tamaño carta', '2020-10-31', '20:10:16', '', 'productos', '1');
INSERT INTO `controlusuarios` VALUES (7, 2, 'REGISTR&Oacute; : Deporte para todos', '2020-11-03', '23:24:07', '', 'areas', '2');
INSERT INTO `controlusuarios` VALUES (8, 1, 'Solicitud Registrada, ahora agregue los productos', '2020-11-11', '19:44:06', '', 'productos', '1');
INSERT INTO `controlusuarios` VALUES (9, 1, 'REGISTR&Oacute; : Caja', '2020-11-12', '17:36:06', '', 'unidadmedida', '2');
INSERT INTO `controlusuarios` VALUES (10, 1, 'REGISTR&Oacute; : Gramo', '2020-11-12', '17:36:20', '', 'unidadmedida', '3');
INSERT INTO `controlusuarios` VALUES (11, 1, 'REGISTR&Oacute; : Pieza', '2020-11-12', '17:36:35', '', 'unidadmedida', '4');

-- ----------------------------
-- Table structure for grupos
-- ----------------------------
DROP TABLE IF EXISTS `grupos`;
CREATE TABLE `grupos`  (
  `IdGrupo` smallint(6) NOT NULL AUTO_INCREMENT,
  `Grupo` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `NumSat` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdGrupo`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of grupos
-- ----------------------------
INSERT INTO `grupos` VALUES (1, 'Material de Oficina', '21101');

-- ----------------------------
-- Table structure for modulosubsistema
-- ----------------------------
DROP TABLE IF EXISTS `modulosubsistema`;
CREATE TABLE `modulosubsistema`  (
  `IdSubsistema` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `NoOpcion` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `Nombre` varchar(70) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Descripcion` varchar(250) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Formulario` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
  `Acceso` char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0'
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of modulosubsistema
-- ----------------------------
INSERT INTO `modulosubsistema` VALUES (1, 2, 'Bitácora de Usuarios', 'Visitadurías', 'BitacoraUsuarios.php', '1');
INSERT INTO `modulosubsistema` VALUES (1, 1, 'Usuarios', 'Usuarios.php', 'Usuarios.php', '1');
INSERT INTO `modulosubsistema` VALUES (1, 3, 'Cambiar Password', 'CambiarPassword.php', 'CambiarPassword.php', '1');
INSERT INTO `modulosubsistema` VALUES (2, 2, 'Catálogo de Proveedores', 'Control de Proveedores', 'Proveedores.php', '1');
INSERT INTO `modulosubsistema` VALUES (3, 1, 'Solicitud de Material', 'Ingresar Solicitud de Material', 'SolicitudMat.php', '1');
INSERT INTO `modulosubsistema` VALUES (3, 2, 'Busquedas y Reportes', 'Busquedas y Reportes', 'BusquedaDeMenor.php', '1');
INSERT INTO `modulosubsistema` VALUES (5, 1, 'Asistencia', 'Asistencia', 'reloj.php', '1');
INSERT INTO `modulosubsistema` VALUES (2, 1, 'Catálogo de Areas', 'Catálogo de Areas', 'Areas.php', '1');
INSERT INTO `modulosubsistema` VALUES (6, 1, 'Credenciales', 'Credenciales', 'BusquedaCredencial.php', '1');
INSERT INTO `modulosubsistema` VALUES (5, 2, 'Crear Esquema', 'Esquemas.php', 'Esquemas.php', '1');
INSERT INTO `modulosubsistema` VALUES (2, 3, 'Catálogo de Unidad de Medida', 'Control de Unidad de Medida', 'UnidadMedida.php', '1');
INSERT INTO `modulosubsistema` VALUES (2, 4, 'Catálogo de Partidas', 'Catálogo de Partidas', 'Grupos.php', '1');
INSERT INTO `modulosubsistema` VALUES (2, 5, 'Catálogo de Productos', 'Catálogo de Productos', 'Productos.php', '1');

-- ----------------------------
-- Table structure for prodsol
-- ----------------------------
DROP TABLE IF EXISTS `prodsol`;
CREATE TABLE `prodsol`  (
  `IdProdSol` int(11) NOT NULL,
  `IdProducto` smallint(6) NULL DEFAULT NULL,
  `IdSolicitud` int(11) NULL DEFAULT NULL,
  `EstatusProd` tinyint(4) NULL DEFAULT NULL,
  `UnidadMedida` smallint(6) NULL DEFAULT NULL,
  `Cantidad` smallint(6) NULL DEFAULT NULL,
  PRIMARY KEY (`IdProdSol`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Table structure for productos
-- ----------------------------
DROP TABLE IF EXISTS `productos`;
CREATE TABLE `productos`  (
  `IdProducto` smallint(6) NOT NULL AUTO_INCREMENT,
  `ClaveSat` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Descripcion` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CodBarras` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Partida` smallint(6) NULL DEFAULT NULL,
  `Subpartida` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdProducto`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of productos
-- ----------------------------
INSERT INTO `productos` VALUES (1, '14111507', 'Hojas blancas tamaño carta', '11111', 1, '101');

-- ----------------------------
-- Table structure for proveedores
-- ----------------------------
DROP TABLE IF EXISTS `proveedores`;
CREATE TABLE `proveedores`  (
  `IdProveedor` smallint(6) NOT NULL AUTO_INCREMENT,
  `Nombre` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Apaterno` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Amaterno` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `RFC` varchar(13) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdProveedor`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of proveedores
-- ----------------------------
INSERT INTO `proveedores` VALUES (1, 'Jose Raúl', 'Baeza', 'Rodríguez', 'BARR630417GF3');
INSERT INTO `proveedores` VALUES (2, 'HUGO IGNACIO ', 'CERON ', 'MENDOZA', 'S');
INSERT INTO `proveedores` VALUES (3, 'DALIA ', 'HOIL ', 'ALONZO ', 'A');

-- ----------------------------
-- Table structure for solicitudes
-- ----------------------------
DROP TABLE IF EXISTS `solicitudes`;
CREATE TABLE `solicitudes`  (
  `IdSolicitud` int(11) NOT NULL AUTO_INCREMENT,
  `AreaSol` smallint(6) NULL DEFAULT NULL,
  `FechaSol` date NULL DEFAULT NULL,
  `Estatus` tinyint(4) NULL DEFAULT NULL,
  `Comentarios` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdSolicitud`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of solicitudes
-- ----------------------------
INSERT INTO `solicitudes` VALUES (1, 1, '2020-11-11', 1, 'prueba');

-- ----------------------------
-- Table structure for subsistemas
-- ----------------------------
DROP TABLE IF EXISTS `subsistemas`;
CREATE TABLE `subsistemas`  (
  `IdSubsistema` tinyint(2) UNSIGNED NOT NULL AUTO_INCREMENT,
  `Nombre` varchar(30) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Descripcion` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Directorio` varchar(30) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
  `Icono` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdSubsistema`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 256 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of subsistemas
-- ----------------------------
INSERT INTO `subsistemas` VALUES (1, 'Administración', 'Administración', 'Administracion', 'glyphicon glyphicon-user');
INSERT INTO `subsistemas` VALUES (5, 'Esquemas', 'Esquemas', 'Esquemas', 'glyphicon glyphicon-list-alt');
INSERT INTO `subsistemas` VALUES (2, 'Catálogos', 'Catálogos', 'Catalogos', 'glyphicon glyphicon-tasks');
INSERT INTO `subsistemas` VALUES (3, 'Almacen', 'Administración de Almacen', 'Almacen', 'fa fa-wpforms');
INSERT INTO `subsistemas` VALUES (6, 'Reportes', 'Reportes', 'cipi/reportes', 'glyphicon glyphicon-print');

-- ----------------------------
-- Table structure for subsistemausuarios
-- ----------------------------
DROP TABLE IF EXISTS `subsistemausuarios`;
CREATE TABLE `subsistemausuarios`  (
  `IdUsuario` smallint(4) UNSIGNED NOT NULL DEFAULT 0,
  `IdSubsistema` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `NoOpcion` tinyint(2) UNSIGNED NOT NULL DEFAULT 0
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;

-- ----------------------------
-- Records of subsistemausuarios
-- ----------------------------
INSERT INTO `subsistemausuarios` VALUES (1, 1, 1);
INSERT INTO `subsistemausuarios` VALUES (1, 1, 2);
INSERT INTO `subsistemausuarios` VALUES (1, 1, 3);
INSERT INTO `subsistemausuarios` VALUES (1, 1, 4);
INSERT INTO `subsistemausuarios` VALUES (1, 1, 5);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 1);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 2);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 3);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 4);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 5);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 6);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 7);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 1);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 2);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 3);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 4);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 5);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 6);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 7);
INSERT INTO `subsistemausuarios` VALUES (1, 3, 8);
INSERT INTO `subsistemausuarios` VALUES (1, 4, 1);
INSERT INTO `subsistemausuarios` VALUES (1, 4, 2);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 2);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 3);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 4);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 5);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 6);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 7);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 8);
INSERT INTO `subsistemausuarios` VALUES (1, 5, 9);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 8);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 9);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 10);
INSERT INTO `subsistemausuarios` VALUES (1, 2, 11);
INSERT INTO `subsistemausuarios` VALUES (1, 4, 3);
INSERT INTO `subsistemausuarios` VALUES (1, 4, 4);
INSERT INTO `subsistemausuarios` VALUES (1, 4, 5);
INSERT INTO `subsistemausuarios` VALUES (2, 2, 1);
INSERT INTO `subsistemausuarios` VALUES (2, 1, 3);
INSERT INTO `subsistemausuarios` VALUES (2, 1, 2);
INSERT INTO `subsistemausuarios` VALUES (2, 1, 1);
INSERT INTO `subsistemausuarios` VALUES (12, 2, 4);
INSERT INTO `subsistemausuarios` VALUES (12, 2, 3);
INSERT INTO `subsistemausuarios` VALUES (12, 2, 2);
INSERT INTO `subsistemausuarios` VALUES (12, 2, 1);
INSERT INTO `subsistemausuarios` VALUES (12, 1, 3);
INSERT INTO `subsistemausuarios` VALUES (2, 2, 5);
INSERT INTO `subsistemausuarios` VALUES (2, 2, 4);
INSERT INTO `subsistemausuarios` VALUES (2, 2, 3);
INSERT INTO `subsistemausuarios` VALUES (2, 2, 2);
INSERT INTO `subsistemausuarios` VALUES (2, 3, 1);
INSERT INTO `subsistemausuarios` VALUES (2, 3, 2);
INSERT INTO `subsistemausuarios` VALUES (2, 5, 2);
INSERT INTO `subsistemausuarios` VALUES (2, 5, 3);

-- ----------------------------
-- Table structure for unidadmedida
-- ----------------------------
DROP TABLE IF EXISTS `unidadmedida`;
CREATE TABLE `unidadmedida`  (
  `IdUnidadMedida` smallint(6) NOT NULL AUTO_INCREMENT,
  `UnidadMedida` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `Abreviatura` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`IdUnidadMedida`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of unidadmedida
-- ----------------------------
INSERT INTO `unidadmedida` VALUES (1, 'Kilogramo', 'Kg');
INSERT INTO `unidadmedida` VALUES (2, 'Caja', 'Cj');
INSERT INTO `unidadmedida` VALUES (3, 'Gramo', 'Gr');
INSERT INTO `unidadmedida` VALUES (4, 'Pieza', 'Pz');

-- ----------------------------
-- Table structure for usuarios
-- ----------------------------
DROP TABLE IF EXISTS `usuarios`;
CREATE TABLE `usuarios`  (
  `IdUsuario` smallint(6) NOT NULL AUTO_INCREMENT,
  `Usuario` varchar(30) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Password` varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Nombre` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Tipo` char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
  `Puesto` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
  `foto` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin NULL DEFAULT NULL,
  `email` varchar(50) CHARACTER SET latin1 COLLATE latin1_bin NULL DEFAULT NULL,
  PRIMARY KEY (`IdUsuario`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 13 CHARACTER SET = latin1 COLLATE = latin1_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of usuarios
-- ----------------------------
INSERT INTO `usuarios` VALUES (1, 'admin', 'c4b2f3d89b01b414e3b3b36cc6bdd349', 'GONZALO OVANDO GÓMEZ', 'A', 'WEB MASTER', 'dino1-1.png', 'administrador@chkmx.com');
INSERT INTO `usuarios` VALUES (2, 'adrian', '6bd761d4fe021e62a2eefce1b2493e0e', 'Adrian Domínguez', 'A', 'Encargado de Almacén', '35530599_1776365372400756_5999318204336308224_o.jpg', 'aaadddominguez@gmail.com');
INSERT INTO `usuarios` VALUES (12, 'captu', '21c07b2d706b600117dd69c577456d87', 'capturador', 'N', 'capturista', NULL, NULL);

-- ----------------------------
-- Table structure for usuariosadmin
-- ----------------------------
DROP TABLE IF EXISTS `usuariosadmin`;
CREATE TABLE `usuariosadmin`  (
  `IdUsuario` smallint(4) UNSIGNED NOT NULL DEFAULT 0,
  `IdSubsistema` tinyint(2) UNSIGNED NOT NULL DEFAULT 0,
  `NoOpcion` tinyint(2) UNSIGNED NOT NULL DEFAULT 0
) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_bin ROW_FORMAT = Fixed;

-- ----------------------------
-- Records of usuariosadmin
-- ----------------------------
INSERT INTO `usuariosadmin` VALUES (4, 3, 1);
INSERT INTO `usuariosadmin` VALUES (4, 2, 2);
INSERT INTO `usuariosadmin` VALUES (4, 2, 1);
INSERT INTO `usuariosadmin` VALUES (4, 1, 3);
INSERT INTO `usuariosadmin` VALUES (4, 1, 2);
INSERT INTO `usuariosadmin` VALUES (4, 1, 1);
INSERT INTO `usuariosadmin` VALUES (4, 3, 2);
INSERT INTO `usuariosadmin` VALUES (4, 3, 3);
INSERT INTO `usuariosadmin` VALUES (4, 3, 4);
INSERT INTO `usuariosadmin` VALUES (4, 3, 5);
INSERT INTO `usuariosadmin` VALUES (5, 3, 1);
INSERT INTO `usuariosadmin` VALUES (5, 3, 2);
INSERT INTO `usuariosadmin` VALUES (5, 3, 3);
INSERT INTO `usuariosadmin` VALUES (5, 3, 4);
INSERT INTO `usuariosadmin` VALUES (5, 3, 5);
INSERT INTO `usuariosadmin` VALUES (7, 3, 5);
INSERT INTO `usuariosadmin` VALUES (7, 3, 4);
INSERT INTO `usuariosadmin` VALUES (7, 3, 3);
INSERT INTO `usuariosadmin` VALUES (7, 3, 2);
INSERT INTO `usuariosadmin` VALUES (7, 3, 1);
INSERT INTO `usuariosadmin` VALUES (7, 2, 2);
INSERT INTO `usuariosadmin` VALUES (7, 2, 1);
INSERT INTO `usuariosadmin` VALUES (7, 1, 3);
INSERT INTO `usuariosadmin` VALUES (9, 2, 1);
INSERT INTO `usuariosadmin` VALUES (9, 2, 2);
INSERT INTO `usuariosadmin` VALUES (9, 3, 1);
INSERT INTO `usuariosadmin` VALUES (9, 3, 2);
INSERT INTO `usuariosadmin` VALUES (9, 3, 3);
INSERT INTO `usuariosadmin` VALUES (9, 3, 4);
INSERT INTO `usuariosadmin` VALUES (9, 3, 5);
INSERT INTO `usuariosadmin` VALUES (8, 3, 5);
INSERT INTO `usuariosadmin` VALUES (8, 3, 4);
INSERT INTO `usuariosadmin` VALUES (8, 3, 3);
INSERT INTO `usuariosadmin` VALUES (8, 3, 2);
INSERT INTO `usuariosadmin` VALUES (8, 3, 1);
INSERT INTO `usuariosadmin` VALUES (6, 3, 5);
INSERT INTO `usuariosadmin` VALUES (6, 3, 4);
INSERT INTO `usuariosadmin` VALUES (6, 3, 3);
INSERT INTO `usuariosadmin` VALUES (6, 3, 2);
INSERT INTO `usuariosadmin` VALUES (6, 3, 1);
INSERT INTO `usuariosadmin` VALUES (6, 2, 2);
INSERT INTO `usuariosadmin` VALUES (6, 2, 1);
INSERT INTO `usuariosadmin` VALUES (8, 2, 2);
INSERT INTO `usuariosadmin` VALUES (8, 2, 1);
INSERT INTO `usuariosadmin` VALUES (13, 2, 1);
INSERT INTO `usuariosadmin` VALUES (13, 1, 3);
INSERT INTO `usuariosadmin` VALUES (13, 1, 2);

-- ----------------------------
-- Table structure for usuariosmodulos
-- ----------------------------
DROP TABLE IF EXISTS `usuariosmodulos`;
CREATE TABLE `usuariosmodulos`  (
  `IdUsuario` smallint(6) NOT NULL DEFAULT 0,
  `IdModulo` smallint(6) NOT NULL DEFAULT 0
) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_bin ROW_FORMAT = Fixed;

-- ----------------------------
-- Records of usuariosmodulos
-- ----------------------------
INSERT INTO `usuariosmodulos` VALUES (1, 2);
INSERT INTO `usuariosmodulos` VALUES (1, 1);
INSERT INTO `usuariosmodulos` VALUES (1, 3);
INSERT INTO `usuariosmodulos` VALUES (1, 4);
INSERT INTO `usuariosmodulos` VALUES (1, 5);
INSERT INTO `usuariosmodulos` VALUES (1, 6);
INSERT INTO `usuariosmodulos` VALUES (1, 8);
INSERT INTO `usuariosmodulos` VALUES (1, 7);

-- ----------------------------
-- View structure for vista_productos
-- ----------------------------
DROP VIEW IF EXISTS `vista_productos`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `vista_productos` AS select concat(`productos`.`IdProducto`,' - ',`productos`.`CodBarras`,' ',`productos`.`ClaveSat`,' ',`productos`.`Descripcion`) AS `NomProducto`,`productos`.`Partida` AS `Partida`,`productos`.`Subpartida` AS `Subpartida` from `productos`;

SET FOREIGN_KEY_CHECKS = 1;
