-- Host: db-master-8.internal    Database: analytics


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=18796;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$/mmDUtIFG9J7NE/VMX90/piI1DKqRZOLzZ/yGzvCEQ5iSURX4qbcC','admin','ak_c708f1aaf709dce0','2023-02-21 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$DW0bnEfQuJrT1bkSOHXlHcU.9h.6PZVShCFdw0nMFv3yEYL3kNoGe','admin','ak_19a91404ea754ea9','2023-11-06 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$75v5gII.KCZQGT9C7sYwBOqvOJhrA/mJ/gi2ixl4Hx5ZisyS5iVNt','admin','ak_de0a4cc382df68cd','2023-10-21 10:08:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=28533;

--
-- Dumping data for table `orders`
--


