-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 08-07-2018 a las 12:58:11
-- Versión del servidor: 10.1.31-MariaDB-cll-lve
-- Versión de PHP: 5.6.30

START TRANSACTION;



--
-- Base de datos: `rinucoms_book`
--

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

--
-- Estructura de tabla para la tabla `users`
--

CREATE TABLE `users` (
  `user_id` mediumint(8) UNSIGNED NOT NULL,
  `fname` varchar(85) DEFAULT NULL,
  `lname` varchar(85) DEFAULT NULL,
  `username` varchar(85) DEFAULT NULL,
  `email` varchar(85) NOT NULL,
  `password` varchar(85) NOT NULL,
  `salt` varchar(85) NOT NULL,
  `organization` varchar(85) DEFAULT NULL,
  `position` varchar(85) DEFAULT NULL,
  `phone` varchar(85) DEFAULT NULL,
  `timezone` varchar(85) NOT NULL,
  `language` varchar(10) NOT NULL,
  `homepageid` tinyint(2) UNSIGNED NOT NULL DEFAULT '1',
  `date_created` datetime NOT NULL,
  `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastlogin` datetime DEFAULT NULL,
  `status_id` tinyint(2) UNSIGNED NOT NULL,
  `legacyid` char(16) DEFAULT NULL,
  `legacypassword` varchar(32) DEFAULT NULL,
  `public_id` varchar(20) DEFAULT NULL,
  `allow_calendar_subscription` tinyint(1) NOT NULL DEFAULT '0',
  `default_schedule_id` smallint(5) UNSIGNED DEFAULT NULL,
  `credit_count` decimal(7,2) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `users` (`user_id`, `fname`, `lname`, `username`, `email`, `password`, `salt`, `organization`, `position`, `phone`, `timezone`, `language`, `homepageid`, `date_created`, `last_modified`, `lastlogin`, `status_id`, `legacyid`, `legacypassword`, `public_id`, `allow_calendar_subscription`, `default_schedule_id`, `credit_count`) VALUES
(1, 'User', 'User', 'user', 'user@example.com', '7b6aec38ff9b7650d64d0374194307bdde711425', '3b3dbb9b', 'XYZ Org Inc.', NULL, NULL, 'America/Chicago', 'en_us', 1, '2018-06-23 10:52:26', '2018-06-23 10:52:26', '2008-09-16 01:59:00', 1, NULL, NULL, NULL, 0, NULL, NULL),
(2, 'LUIS', 'A', 'admin', 'luisriveraa@gmail.com', 'dc1d36a9ee117242025b2b8d8e6d6e1dd66f5997', '09273047', 'Booked Scheduler', NULL, NULL, 'America/Chicago', 'es', 1, '2018-06-23 10:52:26', '2018-07-08 01:57:55', '2018-07-08 07:27:55', 1, NULL, NULL, '5b2dd9782d61b', 0, NULL, '0.00'),
(3, 'ALBERTO', 'PEÑA', 'alberto', 'luisriveraa@zoom.com', '9c1f66c615f7d460d1063d6a6867f5731932c367', '5e41f644', 'CQFP', 'GERENTE', '999626277', 'America/Lima', 'es', 1, '2018-07-08 07:14:56', '2018-07-08 01:44:56', '2018-07-08 07:14:56', 1, NULL, NULL, '5b41b9f041198', 0, NULL, '0.00');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`user_id`),
  ADD UNIQUE KEY `public_id` (`public_id`),
  ADD KEY `status_id` (`status_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
  MODIFY `user_id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`status_id`) REFERENCES `user_statuses` (`status_id`) ON UPDATE CASCADE;
COMMIT;

