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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$VC0e1dxe2W3Epw2Vjo3DMSq.1zFtMMQp1cYW7ScbUyKf4T2JcBL/D','user','ak_aaade1911c57502c','2023-01-07 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$XYu2u0cKteS153iMF.XOpXC3W1rt9/FXsq7lImg/WHbCVFAh85G8K','user','ak_aa2cbed8983cdfeb','2023-10-23 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$me2MkGE61xeeAHHp8omYwopgVapVe4EJlRgM/beSejmle5j6m6wOD','user','ak_6708c364da94d05a','2023-05-20 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$8EWqMCpfRx3c8caP2lzT2bcmEhhjaukbPMym.yHQlp8DdCenn5K3P','admin','ak_0604420742979d42','2023-01-12 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=17810;

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


