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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$I8Gtf.oYoJCFuHqb8Vk/bM/eQIpk6A2oGI9gdfmZ9ACB3Jh/A4oBR','admin','ak_dbbe1f8356f0e14e','2023-04-06 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$EvwqYm2yhaU6SIWj/DbBdeL16xZafvTO2/5evKEWT4mYx/sSA3Tnu','admin','ak_e5a091fd5f85bbc6','2023-06-24 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$XGSERsguAfwUaZhJqSWvBtoYf0N5R4jHpOwgXoqFmNzpoe7ItAqGE','user','ak_cb86e3580be8f448','2023-10-20 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$8ifsBNFV7DotoHkvQt18zKzhlxXlDI7z.Jty3WQkLfN2dqfIi94kV','user','ak_bf0155a8767b99d6','2023-02-21 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$Iq/xoCOEsbLd15cugrE7T1c81ewL.3/GIUIYQWNs.q8HSnKSuUfxc','user','ak_a28782feba523d15','2023-09-24 10:16:00',NULL);

