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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$zima1SPcQJUxNFCvziAE/XkLbvwktBijT0ZWB.dApibeyx.5LmPhr','user','ak_2803c3b109083e2c','2023-03-25 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$TRlqaHFgdKMNSnw9HRYFGI6CJVC.3jiTq7hFjCG/SkBzMKZdH8QTL','user','ak_93dffc58a5b04a63','2023-02-16 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$5k/xI337AUEJ7ltfCtAYJ3mE1A0PwPCh7d29FhP99czw17LRwGNAc','user','ak_0e000ff0ff685b67','2023-05-18 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$0bIpJm1sL.upGMhY.qyedkrDTzm3LjDz7lBgzT14nDa/Rb3CC16rE','admin','ak_517b8ef18bc88552','2023-10-02 10:01:00',NULL);

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

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


