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


--
-- 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=15959;

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


--
-- 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=43666;

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$FCJtlCzWXolc5MUlRYted5tiB56rdp6jbToqIfuuqchByjxn3iWr8','user','ak_63d53e29987b20db','2023-08-01 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$SOXDqQVxN2lDWpcK0uBhniJXGdMoECWahMiD.VtEPRcP9fUuYIPvD','user','ak_e208703305e2bf6b','2023-01-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$nlIpFH.bIBLHkL8b90/IoiMIDMN1Vw0CcKOJjacMhLXD38L.GgN8F','user','ak_6f70f0c616ef0738','2023-02-27 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$RyTNEnJh4.WYe6Ax2SYSdCeJt9JkwY54y5nho/T0HuBVo0/9IOStb','admin','ak_5936bd57d2e5b21e','2023-02-05 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$RIycN5HcHWxmfHu97BOPDnls87z658CSR72gbvcmmWtXRzq..GOhJ','admin','ak_0b55f847923c6db2','2023-03-04 10:21:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=1449;

--
-- Dumping data for table `products`
--


