-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 16-12-2022 a las 09:37:03
-- Versión del servidor: 8.0.31-0ubuntu0.20.04.2
-- Versión de PHP: 7.4.3

START TRANSACTION;
















CREATE TABLE `customers_catalog_items` (
  `id` int NOT NULL,
  `catalogs_id` int NOT NULL,
  `users_sid` varchar(50) NOT NULL,
  `global_branch_office_id` varchar(50) NOT NULL COMMENT 'related to branch office',
  `value` int NOT NULL,
  `label` varchar(250) NOT NULL,
  `lang` varchar(5) NOT NULL,
  `catalog_code` varchar(50) NOT NULL,
  `catalog_code_dep` varchar(50) NOT NULL,
  `catalog_id_dep` int NOT NULL,
  `description` varchar(512) NOT NULL,
  `svg_image` varchar(150) DEFAULT NULL,
  `status` varchar(2) NOT NULL DEFAULT 'A',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Volcado de datos para la tabla `customers_catalog_items`
--

INSERT INTO `customers_catalog_items` (`id`, `catalogs_id`, `users_sid`, `global_branch_office_id`, `value`, `label`, `lang`, `catalog_code`, `catalog_code_dep`, `catalog_id_dep`, `description`, `svg_image`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, 'CLIENTE', 'es', 'TIPOCLIENTE', '0', 0, 'CLIENTE', NULL, 'A', '2022-03-08 19:59:55', '2022-03-08 19:59:55'),
(2, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 2, 'PROSPECTO', 'es', 'TIPOCLIENTE', '0', 0, 'PROSPECTO', NULL, 'A', '2022-03-08 20:00:02', '2022-03-08 20:00:02'),
(3, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, 'CI - CEDULA DE IDENTIDAD', 'es', 'TIPODOCUMENTO', '0', 0, 'CI - CEDULA DE IDENTIDAD', NULL, 'A', '2022-03-08 22:47:53', '2022-03-08 22:47:53'),
(4, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 2, 'CEX - CEDULA DE IDENTIDAD DE EXTRANJERO', 'es', 'TIPODOCUMENTO', '0', 0, 'CEX - CEDULA DE IDENTIDAD DE EXTRANJERO', NULL, 'A', '2022-03-08 22:48:01', '2022-03-08 22:48:01'),
(5, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 3, 'PAS - PASAPORTE', 'es', 'TIPODOCUMENTO', '0', 0, 'PAS - PASAPORTE', NULL, 'A', '2022-03-08 22:48:08', '2022-03-08 22:48:08'),
(6, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 4, 'OD - OTRO DOCUMENTO DE IDENTIDAD', 'es', 'TIPODOCUMENTO', '0', 0, 'OD - OTRO DOCUMENTO DE IDENTIDAD', NULL, 'A', '2022-03-08 22:48:15', '2022-03-08 22:48:15'),
(7, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 5, 'NIT - NÚMERO DE IDENTIFICACIÓN TRIBUTARIA', 'es', 'TIPODOCUMENTO', '0', 0, 'NIT - NÚMERO DE IDENTIFICACIÓN TRIBUTARIA', NULL, 'A', '2022-03-08 22:48:21', '2022-03-08 22:48:21'),
(8, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 2, 'MUJER', 'es', 'GENDER', '0', 0, 'MUJER', NULL, 'A', '2022-04-11 20:37:43', '2022-04-11 20:37:54'),
(9, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, 'VARON', 'es', 'GENDER', '0', 0, 'VARON', NULL, 'A', '2022-04-11 20:38:03', '2022-04-11 20:38:03'),
(10, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 3, 'CONTROL TRIBUTARIO', 'es', 'TIPOCLIENTE', '0', 0, 'CONTROL TRIBUTARIO', NULL, 'A', '2022-10-13 10:40:15', '2022-10-13 10:40:15'),
(11, 1, '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 4, 'VENTAS MENORES DEL DIA', 'es', 'TIPOCLIENTE', '0', 0, 'VENTAS MENORES DEL DIA', NULL, 'A', '2022-10-13 10:40:21', '2022-10-13 10:40:21');

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

--
-- Estructura de tabla para la tabla `portfolio_customers`
--

CREATE TABLE `portfolio_customers` (
  `relative` varchar(50) NOT NULL,
  `users_sid` varchar(50) NOT NULL COMMENT 'Related to users table',
  `global_branch_office_id` varchar(50) NOT NULL COMMENT 'Related to branch office on core',
  `customer_type_id` int NOT NULL COMMENT 'Related to catalogs item',
  `code` varchar(100) DEFAULT NULL,
  `first_name` varchar(75) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `middle_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'Could be null',
  `last_name` varchar(50) DEFAULT NULL COMMENT 'Could be null',
  `country_id` int NOT NULL COMMENT 'Related to country table',
  `document_type` int NOT NULL COMMENT 'Related to catalogs table = DOCTYPE',
  `document_number` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0',
  `customer_complemento` varchar(5) DEFAULT NULL COMMENT 'The complement',
  `gender_id` int DEFAULT NULL COMMENT 'Related to catalogs items = GENDER',
  `birthday` date DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `social_media` text,
  `phones` varchar(150) DEFAULT NULL,
  `address` varchar(512) DEFAULT NULL,
  `references` mediumtext,
  `photo` text,
  `status` varchar(2) NOT NULL DEFAULT 'A',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Volcado de datos para la tabla `portfolio_customers`
--

INSERT INTO `portfolio_customers` (`relative`, `users_sid`, `global_branch_office_id`, `customer_type_id`, `code`, `first_name`, `middle_name`, `last_name`, `country_id`, `document_type`, `document_number`, `customer_complemento`, `gender_id`, `birthday`, `email`, `social_media`, `phones`, `address`, `references`, `photo`, `status`, `created_at`, `updated_at`) VALUES
('0225ef41-d47a-4c8b-822c-83fe7802900c', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'APARICIO', NULL, NULL, 27, 5, '4807414019', NULL, NULL, NULL, 'lenin.aparicio@gmail.com', NULL, NULL, NULL, NULL, NULL, 'A', '2022-04-27 10:54:03', '2022-04-27 10:54:03'),
('115ae19c-ed79-41d8-ac4f-b5e7e429e6ec', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'Sin nombre', NULL, NULL, 27, 5, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-09-13 10:24:40', '2022-09-13 10:24:40'),
('14ce242b-726b-4a4a-bd78-e86b68c76278', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'GUAMAN', NULL, NULL, 27, 5, '5317859', NULL, NULL, NULL, 'telassimg@gmail.com', NULL, NULL, NULL, NULL, NULL, 'A', '2022-11-25 12:14:26', '2022-11-25 12:14:26'),
('573ad394-c575-45ca-bdee-42ef9026edf0', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'UNICEF BOLIVIA', NULL, NULL, 27, 5, '99001', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-10-13 09:54:02', '2022-10-13 09:54:02'),
('59749823-ae2c-410f-9d5d-8f8e65d21ab0', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'APARICIO', NULL, NULL, 27, 5, '2312360019', NULL, NULL, NULL, 'lenin.aparicio@gmail.com', NULL, NULL, NULL, NULL, NULL, 'A', '2022-09-13 10:19:22', '2022-09-13 10:19:22'),
('6061b58c-3e2f-46e4-9f24-d179ed0c9c7a', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'ORGANO ELECTORAL PLURINACIONAL', NULL, NULL, 27, 5, '120803024', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-10-19 11:42:31', '2022-10-19 11:42:31'),
('6abed42e-9cfc-4bbb-b371-6073284c8b81', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'Argándoña & Asociados', NULL, NULL, 27, 5, '1984651254015', NULL, NULL, NULL, 'sinpruebas2@gmail.com', NULL, NULL, NULL, NULL, NULL, 'A', '2022-12-15 09:36:21', '2022-12-15 09:36:21'),
('9a20f7f2-4bbd-4490-985d-861128c1e6b0', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, NULL, 'Juan', NULL, 'Perez', 27, 1, '123456787', NULL, 1, '1982-09-16', NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-04-27 00:26:12', '2022-04-27 00:26:12'),
('9bd62be8-3ed4-4b3e-a21e-ab1758623934', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'nuevo cliente', NULL, NULL, 27, 5, '123456789', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-10-24 22:02:34', '2022-10-24 22:02:34'),
('c40cd953-5650-4455-9a22-ade5cb129289', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 4, '0', 'VENTAS MENORES DEL DIA', NULL, NULL, 27, 5, '99003', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-10-20 16:08:05', '2022-10-20 16:08:05'),
('f8f35165-7876-4cd0-897f-e0fea017f05a', '69abe0de-7812-41bd-9124-6a7238aee7d1', '69abe0de-7812-41bd-9124-6a7238aee7d1', 1, '0', 'CONTROL TRIBUTARIO', NULL, NULL, 27, 5, '99002', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A', '2022-10-13 10:11:33', '2022-10-13 10:11:33');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `customers_catalog_items`
--
ALTER TABLE `customers_catalog_items`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `portfolio_customers`
--
ALTER TABLE `portfolio_customers`
  ADD PRIMARY KEY (`relative`),
  ADD UNIQUE KEY `relative` (`relative`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `customers_catalog_items`
--
ALTER TABLE `customers_catalog_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
COMMIT;

