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


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$ynqzLCu8PIj6uWzIdQeOVY.OsPFibHJi9/n5RIGmq.E.D35t98gMX','user','ak_9acc1cffa3462f7a','2023-06-15 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$qSHJW9us04w9REuZToXAKCrcysK65vyEM0xsPvnD9vj2hTagWpI3D','user','ak_8994f66e3e172878','2023-03-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$j3X0alW1Yt2T4wlzX7TJcphiXOnFpUCGSEaS/d52egfQ2jjIyKnu3','user','ak_8521391df78bcd5f','2023-02-20 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$8lTOYY0K5fbseYa30QrSzLsLUBXCCVDN7qPUJ1oB5dyt7jw4pw/ay','user','ak_1d1ccb769b2ce71f','2023-06-09 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$4doypgyhbqSMeW6QJfIoP9h3oBoFEMz9oMUPAIwnxU7/5ovmtmCPj','admin','ak_2f1620eea63750e8','2023-03-08 10:03:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$wNFZvyyYCjWzAd6ovXaS/Z5UxKq4w6BisvuyPEeZtIGb3uCfXV8aU','admin','ak_5d3e3b8aaf4d3101','2023-09-22 10:00:00',NULL);

