-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 01, 2023 at 01:38 AM
-- Server version: 5.7.43
-- PHP Version: 8.1.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `demoknestlms_multi`
--

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

--
-- Table structure for table `trax_account_users`
--

CREATE TABLE `trax_account_users` (
  `id` int(10) UNSIGNED NOT NULL,
  `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `admin` tinyint(1) NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `data` json NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `source_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'internal',
  `entity_type_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `role_id` int(10) UNSIGNED DEFAULT NULL,
  `organization_id` int(10) UNSIGNED DEFAULT NULL,
  `entity_id` int(10) UNSIGNED DEFAULT NULL,
  `firstname` varchar(255) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (json_unquote(json_extract(`data`,'$.firstname'))) VIRTUAL,
  `lastname` varchar(255) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (json_unquote(json_extract(`data`,'$.lastname'))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `trax_account_users`
--

INSERT INTO `trax_account_users` (`id`, `uuid`, `username`, `email`, `email_verified_at`, `password`, `admin`, `active`, `data`, `remember_token`, `created_at`, `updated_at`, `source_code`, `entity_type_code`, `role_id`, `organization_id`, `entity_id`) VALUES
(1, '2bdd73e1-f2ac-338d-a804-5fb39728d093', 'admin@trax.test', 'admin@trax.test', NULL, '$2y$10$3fGH8lsmz0Vtj09F/jVsquNAyyM/kbcIZK/oN69k7qpKQ8VCe7iki', 1, 1, '{\"lang\": \"en\", \"status\": {\"loggedin\": \"2023-08-31 07:27:36\"}, \"lastname\": \"Admin\", \"firstname\": \"Super\", \"rights_level_code\": \"global\"}', NULL, '2023-08-30 19:44:18', '2023-08-31 14:27:36', 'internal', NULL, NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `trax_account_users`
--
ALTER TABLE `trax_account_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `trax_account_users_uuid_unique` (`uuid`),
  ADD UNIQUE KEY `trax_account_users_username_unique` (`username`),
  ADD UNIQUE KEY `trax_account_users_email_unique` (`email`),
  ADD KEY `trax_account_users_role_id_foreign` (`role_id`),
  ADD KEY `trax_account_users_organization_id_foreign` (`organization_id`),
  ADD KEY `trax_account_users_entity_id_foreign` (`entity_id`),
  ADD KEY `trax_account_users_source_code_index` (`source_code`),
  ADD KEY `trax_account_users_entity_type_code_index` (`entity_type_code`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `trax_account_users`
--
ALTER TABLE `trax_account_users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `trax_account_users`
--
ALTER TABLE `trax_account_users`
  ADD CONSTRAINT `trax_account_users_entity_id_foreign` FOREIGN KEY (`entity_id`) REFERENCES `trax_account_entities` (`id`),
  ADD CONSTRAINT `trax_account_users_organization_id_foreign` FOREIGN KEY (`organization_id`) REFERENCES `trax_account_entities` (`id`),
  ADD CONSTRAINT `trax_account_users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `trax_account_roles` (`id`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
