-- Host: db-master-1.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=16097;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$vZbiL9VEzPrQEyJ4TwxV43ip8QU9Y75Fwwx/Cxk5AL/EQCxpIFewI','user','ak_a8d5d4b18250de4e','2023-08-26 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$Ftw4Zz/QkHHjZ2vv3Ldf2zzaPIRybvJ3z1d.Z0pK3GmUexQdrOhEz','admin','ak_712c719ba0c3e0ae','2023-02-04 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$SQFyzChlGzO3k2hqk5oAFuDUUSCQz.NSi6bGIc4K7pGHjIMSftF9W','user','ak_ec1559d1c8a0fdb1','2023-01-04 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$8T74zNjchMBwjkbWhtpdCEgSOJr87pDhFokOQzzWDC2hO1k6wZ8J0','user','ak_75052dd2d43888a4','2023-04-09 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$DYAFK5KsN2lA0Kj2JMYYkQeOLt9ye4KHgSBXzMVhmu5twMnweQz1R','user','ak_87ca0e521f207d46','2023-12-24 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=22596;

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

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


