--
-- Host: 127.0.0.1    Database: usuarios
-- ------------------------------------------------------


--
-- Table structure for table `permiso`
--

CREATE TABLE `permiso` (
  `idpermiso` int(11) NOT NULL AUTO_INCREMENT,
  `idusuario` int(11) DEFAULT NULL,
  `idrol` int(11) DEFAULT NULL,
  `alta` tinyint(4) DEFAULT NULL,
  `modifica` tinyint(4) DEFAULT NULL,
  `baja` tinyint(4) DEFAULT NULL,
  `consulta` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`idpermiso`),
  KEY `fk_permiso_rol_idx` (`idrol`),
  KEY `fk_permiso_usuario1_idx` (`idusuario`),
  CONSTRAINT `fk_permiso_rol` FOREIGN KEY (`idrol`) REFERENCES `rol` (`idrol`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_permiso_usuario1` FOREIGN KEY (`idusuario`) REFERENCES `user` (`idusuario`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `permiso`
--

INSERT INTO `permiso` VALUES (9,100,3,NULL,NULL,NULL,NULL),(13,100,4,NULL,NULL,NULL,NULL);

--
-- Table structure for table `rol`
--

CREATE TABLE `rol` (
  `idrol` int(11) NOT NULL AUTO_INCREMENT,
  `nombrerol` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idrol`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `rol`
--

INSERT INTO `rol` VALUES (2,'contador'),(3,'secretario'),(4,'tesorero');


