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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$DXNgTXPXc3IDGzwoHHQGPvQGgERFzUGnf7oeDoD7v06U4/zd8WyeI','user','ak_2a648cb5359ecaae','2023-01-09 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$5nApPvr7ynIjPEAwTyAYY36L9EiUIjVjew.Wo.VlKJRocZt6UsVnV','user','ak_d5875050f40a2fb6','2023-08-05 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$R9QclX3H.FoU8HOlsd577lL0Hmfw0PKaA.nYC4uwSMkb.MhSa2K8n','admin','ak_26a270492b67bab1','2023-07-26 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$KIMJEUYO.jFcD2z/JFrBV4Al.JhWYI3p99gO3YUYuaAUChM6fPWSF','user','ak_e491f0a04b457fac','2023-09-06 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$ZPa3PmiQTJbvW9TdC6F7CM5dlAdgStPaqDu5dmvB2Cprdt6wWp.7c','user','ak_05a6a8613fefc7a3','2023-07-19 10:13: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=27024;

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


