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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$sbUsdOVRAOZFtbfZrc6GM7i10eY7uGd66Hp8AgrytTyN89mr8IlqL','user','ak_bceb997684893fe8','2023-05-04 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$Lekx6lORCmkLwyORuj14Zh/h60LYNRwL3Vk/hSrM7e2dBCY6qH9hy','user','ak_01345e673066fa44','2023-02-25 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$4j2aJ3NWaPSreTlvysVSyMZwhGptpuP6u6KIIvuvZIX.gh3aVij1J','admin','ak_9c9efa944627430b','2023-10-23 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$ypjMI/MHaWR5UTVuM.6NoXRAhNeNhTgrgPyO3J3QIHkuPTIs5RV.8','user','ak_c5da93ba364df006','2023-12-25 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$vqrnvhxd1VHJuEmARiEXMBLywGZpQSsE0GxaF1RNCAH73ZqjoWc7o','user','ak_75cf593f3b33684d','2023-08-25 10:22:00',NULL);

