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


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

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=50709;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$ztAAr72IMdmQsJJppv0bS/joSQCeBt6vvWriNkYmqawWDEpSPYXDf','user','ak_0252aff477d44c0a','2023-04-04 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$VfP0ZNwkbBrhcPjlYo3.GZMIUmPknoBppZ6KuXVYmvzv0zfh386r7','admin','ak_81c9de5bdfb8326e','2023-02-06 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$.Ft3sLuG/rsB0gStIDHYkhK7zYEqcAJmAFG1n6vo/CIONHZT0MqXV','user','ak_848d8708b53dcc9f','2023-07-27 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$q7TcnjZvraPZqytjIKJ9PhwB/f0FCEQoby3/oInkqz6KDstYpFCzZ','admin','ak_8184c0d0402d5f78','2023-03-21 10:14:00',NULL);

