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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$qXUwzFaq.Gbo18ORZRuVtLjTE/OcCvZR6DmW1X63C3CoanQzqbHgD','admin','ak_6684133ed174df5b','2023-08-12 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$YznsTq/cfzVLnat1LlnrGA.1.LWZIPVzRIkpazifoS4jKoj5Y4I.P','user','ak_a247b1a4945240b3','2023-04-14 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$A1/QlE80q9sOsaEfYpcSSX7t0hjWaEQ4BAP7FZezrky0H0dp/XQn1','user','ak_51096c1a398ddc2e','2023-05-13 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$4/uxmYdojh9NXhkbdBcs1GYr63Si/I/TWGDEm1S45fOBitCN3yZyQ','admin','ak_98195563e95da7a7','2023-08-03 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$v.x6nydNSKziU91QmfVzpYDfXCjpeGvetov.bdrMi7xVyejxWKAuL','admin','ak_84bb898214231ca1','2023-10-10 10:13:00',NULL);

