-- Respaldo completo de 'inversion'
-- Fecha: 2025-10-07 02:43:39

CREATE TABLE `inversion` (
  `idreginv` int(11) NOT NULL AUTO_INCREMENT,
  `idinv` int(11) NOT NULL,
  `fecinv` date NOT NULL,
  `mntinv` decimal(10,2) NOT NULL,
  `estado` tinyint(1) NOT NULL DEFAULT 1,
  `reninv` int(11) DEFAULT NULL,
  PRIMARY KEY (`idreginv`),
  KEY `idinv` (`idinv`),
  CONSTRAINT `inversion_ibfk_1` FOREIGN KEY (`idinv`) REFERENCES `inversionista` (`idinv`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('1','1','2025-01-19','45000.00','1','18');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('4','2','2024-08-12','100000.00','1','18');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('5','3','2025-01-18','103178.38','1','18');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('6','4','2025-07-31','8414.81','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('7','4','2025-08-25','1000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('8','5','2020-01-20','5400.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('9','5','2020-10-27','950.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('10','5','2024-07-16','3000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('11','5','2025-04-22','4000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('12','5','2025-08-02','6000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('14','6','2024-12-01','4191153.17','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('17','7','2025-01-31','257892.38','1','18');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('18','6','2024-12-04','159000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('19','6','2025-01-06','150000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('21','6','2025-03-18','-480000.00','1','12');
INSERT INTO `inversion` (`idreginv`,`idinv`,`fecinv`,`mntinv`,`estado`,`reninv`) VALUES ('22','6','2025-04-01','150000.00','1','12');
