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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$4nSS/r4dTqPj/m//wGkIVxBgcphwG6vJWjT2gwhwddw7aBqSgKVyr','admin','ak_b38b5f7b0d604f8d','2023-12-26 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$aqyjt6.aTwuIGeAv4n0tElttLypiIpaMedqGXqQuHO9UY.1iq.z/c','admin','ak_babe7248d26cd4fa','2023-03-14 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$qsCMyZzjPWxsNkSd5k.jLvZ1uxUm2bEdXPssfk.c0w9TLc536YKEK','user','ak_df5518c3341888ae','2023-01-07 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$1WriuAtIiNysYRNniyRmYbxcCeKSkmAa7xnvY6TdZHUJjII1Z2fUA','admin','ak_a4d5b7e62164e70f','2023-03-17 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$HLSVqRkGwVjaQPZHaOC1Oh9m.JuJL/S7p.CTZklnblGXqUSFIlpX0','admin','ak_21cb27e9f46ad6f1','2023-10-20 10:19: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=12422;

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

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


