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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$CQG9AghfvQug1Q.5g77zqhbYK/YZzxbv5p5x3Ep/GnSp.995/JPLx','user','ak_1c7c4afa18e6784c','2023-03-12 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$4g9KwX3hyxTfCEsLvCGUIVV6MorTFh/TPUG8HzoSeVTssvQgDVIDq','admin','ak_7c51e16d9f4eea3b','2023-12-16 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$3AYDv1MOqP.B8LSdLDLLCKB.4jn7GOrlZ5iPqnS82wWVk6FrRfmLL','user','ak_d5b66c678e49ad90','2023-03-24 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$QvWoAxVWP.RyOYtuzsYj.NEZDoWRTxwPMUe/BUTfpfVHRh9xW3Hbp','user','ak_a593dbd029a50aa5','2023-07-26 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$JL2ex.n9WVIcMywSUPD1noWdeZDmfEa9uMUs31YVCrm.h0zh.TxKE','user','ak_36d8e9702441577d','2023-08-17 10:08: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=17556;

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


