-- Host: db-master-2.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=28061;

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$rnOpMwgKlk61Q5RKLQGenrplbKhWUVXHeuNTV3fKCGFO7mNBsMEgM','admin','ak_9561430463878d31','2023-05-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$BLDENkmd7kwdaSvLWNuPKvhFLtIQMrxzXdfiKYNdLA6Tu5mGKnOiT','user','ak_a8e0bccdecb60d5e','2023-10-19 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$5sqo13P3az8ziqu.IIVp8xJdg0HnMw2PJQCr3h.sAx3uHMV19Lju5','user','ak_15333a9fcaec2b9e','2023-05-20 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$/z9F.7VdLEn65IHwTxBqcYGAb1lCkOGL3SUVuajNmYI0hmO/cpTJp','user','ak_584ef7e8081d7bb7','2023-04-18 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$WEkp/z2LJb7MtxSmo8.3D7DmUmYq/G6DmZ/NwNzm/zPjoHTVRuWAP','user','ak_cc6ceb055b719909','2023-07-10 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$Qi5wqSvaTpx00oGibRI2UVx5z3Cs7yao6MRicoBJzOOz17lGyXHwa','user','ak_7639d052d39e362c','2023-06-02 10:15: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=25171;

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=50360;

--
-- Dumping data for table `audit_log`
--


