-- Host: db-master-8.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=24691;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$wr/vdMCboMymnrvovfhK0A.FSHlqMSOvSmh3QMJjig5s3DOKiVIVz','user','ak_b8698ef221f30ea9','2023-10-11 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$Exoe9DgAXRtvKU8cH7zswlWbgcf93vY56ekPnDCBknwiN0lAggrd6','user','ak_06c35092903963e2','2023-08-03 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$t0VxiSteqKcARN9.acmBjJSK6HSb9ynT444R5.2VxvRyv4JB/XYQM','user','ak_feee11a163e024fd','2023-02-14 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$e0K.GjE1LkWkYj7Y6xy4ONNu1U9XbpszPVY8SeUHXTJKCUeflarkr','user','ak_7978f6ce3ce45c09','2023-11-15 10:03:00',NULL);

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

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


