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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$YnFkWdqW1IVheEwUoiIXSLqVe/Vxkm9aTcDhlTzdts5tek9URMrjN','user','ak_18215811ab2ba2c7','2023-12-13 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$L3Bt0pRnY5iNkr1YQNC04IpZe3yLfo6fGilLOIDUZZK41vQJj0qPQ','user','ak_9ccb23cf621b8014','2023-12-06 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$P3VNomd0fG2eT5g1jGzZ50nkY9pT9ts17lsqS1a6.O2u6/6Jg7JJh','user','ak_8764c9fc317cce18','2023-07-21 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$MJITMG9./hliIJLqvwc0oE3kN6bk.kIvFi3OSVstcoqVmGZIWAuAk','user','ak_637c2ea1f4b7783b','2023-08-04 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$9GANin9/HagNe0B5BpyvuZp0EBPU4N1268Y57lbag6pOEt.K5Ohap','user','ak_a5693e7daa58a405','2023-08-25 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$CKBWwQin0bb418EySeBAH9tAbBpmYYbfgHdQA1rc4.Chul7nc00qW','user','ak_330ae56c2f23af39','2023-04-11 10:05:00',NULL);

