/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80030
 Source Host           : localhost:3306
 Source Schema         : coop

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

 Date: 12/10/2024 18:50:58
*/


-- ----------------------------
-- Table structure for categoria
-- ----------------------------
CREATE TABLE `categoria`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NOT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `estado` int NULL DEFAULT NULL,
  `usuario` int NULL DEFAULT NULL,
  `fecha` date NULL DEFAULT NULL,
  `hora` time NULL DEFAULT NULL,
  PRIMARY KEY (`id`, `id_empresa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of categoria
-- ----------------------------
INSERT INTO `categoria` VALUES (1, 1, 'S/C', 1, 4342680, '2024-10-08', '19:39:09');
INSERT INTO `categoria` VALUES (2, 1, 'A', 1, 4342680, '2024-10-08', '19:39:09');

-- ----------------------------
-- Table structure for clientes
-- ----------------------------
CREATE TABLE `clientes`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NOT NULL,
  `cedula` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `primer_nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `segundo_nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `primer_apellido` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `segundo_apellido` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `apellido_casado` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `fecha_nacimiento` date NULL DEFAULT NULL,
  `id_estadocivil` int NULL DEFAULT NULL,
  `id_genero` int NULL DEFAULT NULL,
  `id_origen` int NULL DEFAULT NULL,
  `id_categoria` int NULL DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `telefono` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `celular` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `proponente` int NULL DEFAULT NULL,
  PRIMARY KEY (`id`, `id_empresa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of clientes
-- ----------------------------
INSERT INTO `clientes` VALUES (1, 1, '4342680', 'Edgar', 'Ariel', 'Caballero', 'Alfonso', NULL, '1990-03-02', 1, 2, 1, 1, 'edgar_caballero90@hotmail.com', '0981371689', '406345', 8);

-- ----------------------------
-- Table structure for conjuge
-- ----------------------------
CREATE TABLE `conjuge`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_cliente` int NULL DEFAULT NULL,
  `cedula_c` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `primer_nombre_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `segundo_nombre_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `primer_apellido_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `segundo_apellidos_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `fecha_nacimiento_c` date NULL DEFAULT NULL,
  `id_nacionalidad_c` int NULL DEFAULT NULL,
  `lugar_trabajo_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `direccion_laboral_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `salario_c` int NULL DEFAULT NULL,
  `ocupacion_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `telefono_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `celular_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `email_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `lugar_nacimiento_c` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of conjuge
-- ----------------------------
INSERT INTO `conjuge` VALUES (1, 1, '12345', 'Maria', 'Eliza', 'jara', 'lopez', '1990-03-03', 1, 'Comagro', 'Eusebio Ayala', 500000, 'Inge', '021518000', '02545444', 'juan@juna', NULL);

-- ----------------------------
-- Table structure for empresa
-- ----------------------------
CREATE TABLE `empresa`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of empresa
-- ----------------------------
INSERT INTO `empresa` VALUES (1, 'QPRO');
INSERT INTO `empresa` VALUES (2, 'QPRO SYSTEM');

-- ----------------------------
-- Table structure for estado_civil
-- ----------------------------
CREATE TABLE `estado_civil`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NOT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `estado` int NULL DEFAULT NULL,
  `usuario` int NULL DEFAULT NULL,
  `fecha` date NULL DEFAULT NULL,
  `hora` time NULL DEFAULT NULL,
  PRIMARY KEY (`id`, `id_empresa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of estado_civil
-- ----------------------------
INSERT INTO `estado_civil` VALUES (1, 1, 'Soltero', 1, 4342680, '2024-10-08', '19:38:39');
INSERT INTO `estado_civil` VALUES (2, 1, 'Casado', 1, 4342680, '2024-10-08', '19:38:39');

-- ----------------------------
-- Table structure for genero
-- ----------------------------
CREATE TABLE `genero`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NOT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `estado` int NULL DEFAULT NULL,
  `usuario` int NULL DEFAULT NULL,
  `fecha` date NULL DEFAULT NULL,
  `hora` time NULL DEFAULT NULL,
  PRIMARY KEY (`id`, `id_empresa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of genero
-- ----------------------------
INSERT INTO `genero` VALUES (1, 1, 'Femenino', 1, 4342680, '2024-10-08', '19:39:38');
INSERT INTO `genero` VALUES (2, 2, 'Masculino', 1, 4342680, '2024-10-08', '19:39:38');

-- ----------------------------
-- Table structure for nacionalidad
-- ----------------------------
CREATE TABLE `nacionalidad`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `codigo` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of nacionalidad
-- ----------------------------
INSERT INTO `nacionalidad` VALUES (1, 'PRY', 'Paraguaya');

-- ----------------------------
-- Table structure for nivel_estudio
-- ----------------------------
CREATE TABLE `nivel_estudio`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NULL DEFAULT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `estado` int NULL DEFAULT NULL,
  `usuario` int NULL DEFAULT NULL,
  `fecha` date NULL DEFAULT NULL,
  `hora` time NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of nivel_estudio
-- ----------------------------
INSERT INTO `nivel_estudio` VALUES (1, 1, 'Primario', 1, 4342680, '2024-10-11', '07:54:40');
INSERT INTO `nivel_estudio` VALUES (2, 1, 'Secundario', 1, 4342680, '2024-10-11', '07:55:00');

-- ----------------------------
-- Table structure for origen
-- ----------------------------
CREATE TABLE `origen`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NOT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `estado` int NULL DEFAULT NULL,
  `usuario` int NULL DEFAULT NULL,
  `fecha` date NULL DEFAULT NULL,
  `hora` time NULL DEFAULT NULL,
  PRIMARY KEY (`id`, `id_empresa`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of origen
-- ----------------------------
INSERT INTO `origen` VALUES (1, 1, 'Casa Matris', 1, 4342680, '2024-10-08', '19:40:02');

-- ----------------------------
-- Table structure for tipo_relacion
-- ----------------------------
CREATE TABLE `tipo_relacion`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_empresa` int NULL DEFAULT NULL,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `estado` int NULL DEFAULT NULL,
  `usuario` int NULL DEFAULT NULL,
  `fecha` date NULL DEFAULT NULL,
  `hora` time NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tipo_relacion
-- ----------------------------
INSERT INTO `tipo_relacion` VALUES (1, 1, 'Amigo', 1, 4342680, '2024-10-11', '07:50:49');
INSERT INTO `tipo_relacion` VALUES (2, 1, 'Cuñado/a', 1, 4342680, '2024-10-11', '07:51:32');

