-- Host: db-master-4.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=29022;

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$C9thkY8vQXCbmLt0ZGM9iL85aUVgHevHnzuJwTOr6k2TPqstAVsno','admin','ak_b3e92ed7a41dfcf7','2023-08-21 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$x/Nuz0Gmife5oT1fkX5U5NWATtJDwR05VgYRaQecpch1SQsXmhJ8a','user','ak_a64c6153e7128818','2023-12-25 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$sOJ51rrAgRdntX9T0KbLWH0kJaYRqjlSyAPOPFMhQolpviXDDB4o3','user','ak_40396a3f0d48b11a','2023-10-03 10:18: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=4137;

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


