-- Host: db-master-1.internal    Database: analytics


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

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=33164;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$RQe2.1KxHb7NFeN4ubNj9hDmkq7JZRJ.aKAidjyEk3Ry.3Vqh1XR1','admin','ak_873b3fe258aaaa95','2023-01-05 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$rfdv5LmRVBc6U90uwcTTtlm79Wpl2.FFuZMTeCoHIwpGHTX.cudrM','user','ak_70a7d146912168e8','2023-03-10 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$A9t2MR2wEQ20Vg/vVsZZ0LxDEql44AhcXEsiisA4YKrBnoETHzcV5','admin','ak_6986fd43575b67fd','2023-08-09 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$IY.X9BSPcCNU2oHp/GpvbHWaMo8S/BLloO30FbVMtx9aZWfda4vwx','user','ak_5d7ec8bd32567fe2','2023-03-27 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$et1RhYwwm3pzCf4mHlRhzthf42O77znZI69hbIdqZ2xWNyxC4GjJg','user','ak_5380ef9684b5dc7d','2023-10-24 10:07:00',NULL);

