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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$zje3X4neFtr/uiPjUJOamsVhW97UculPF0BPBTQeoZdvlEaajb902','user','ak_9d0d070f8b175c58','2023-01-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$vwPCLzk3T3kBlTIEeCqRzuU0zImvkr9vr9nDexQSLu5uOpokCDyZA','admin','ak_532f9ebd2c120659','2023-09-14 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$rwaz0L6IFkOO99lo4HGYTeejBTS1OaxFSq6qqOl4syz.1v.SdmHpD','user','ak_19935f77fbceb747','2023-02-13 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$5zsyB/aFz0NS.syGyh/x68vWxhiHBuDnqmHv5wGaChUzw7OFbjj3R','user','ak_f4cda2c5016e7452','2023-10-13 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$suycwdouLn3mg.hqhSsOxm2vZd2qyVUfj0luP2qf40kF2zosiT.8q','user','ak_9880bd8f73a52bc0','2023-03-01 10:20: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=14992;

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


