-- Host: db-master-9.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=5766;

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$jaakPMKiVXOL/LGrvoJiJwlZH55GRAnvFc45KZ..BUhoINRh83yZV','user','ak_f907d5860e7b6ab6','2023-02-09 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$OUOO8V5p37/uLhyUlxSMIhQWZdlyD1iMkyZCn9/TvJhGAJPNMl69b','admin','ak_cf0da6cd82c25a98','2023-01-17 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$LjDpYl8deS.AzWlB5g7gRnbLJ6mdtABt0R19K.6uXNLeaVTd7YAYn','user','ak_6d7de1f566173c76','2023-05-02 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$IEM5ChJuH0v9nQLeEmCFBWYzIEijU7LpMimm6og4sNnhBl9.X4/yA','user','ak_a465bf7f1733cf3d','2023-10-01 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$KFJQC9joVe2s5jVoclI3xvJkb8ORg4J4u17NcFLg696Eo8IXtxGjb','user','ak_a9bb348c40e73d37','2023-10-24 10:07: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=34959;

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


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

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


