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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$78.CCKBQSBBPR9KsjEL4aRAMFDmZTgV8kZleFBDVamaqzkb7l0ZuN','user','ak_a879876e358fb4f1','2023-10-06 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$/8x8cn65mlEXlwBHszr.8sTc9EEOTo6FoK/YGfR.pS2bJSmiZKgD8','user','ak_089de2843301d967','2023-07-15 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$k52myaj7zo1nPu0b6d4XKdIXxMxXIZdXMrM928Db1rrpL3kCEmtWB','user','ak_79949e119e1b8347','2023-04-27 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$a/5SK7HXxKW8VzNbrzV90r9wnb.4KcrE43iq1uBmOJMkm5ReGaxdx','user','ak_c65ca7efbda335c1','2023-05-19 10:06: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=17688;

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


