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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$Vv39R4xCYG.z2kPb3CKDUIjAQAEZBauKiu9Kd6/pfx341gSOjjUCG','user','ak_635f969ef8eaeed2','2023-04-09 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$di54hEapR3MLvu6E8ApRFCUeggddceHRTWsK0vvL.OHbwaiXOODpo','user','ak_6a4771c7610550be','2023-08-01 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$v5c2jabWOWVQ1PIEzIyE2NZndhntlVuBrDbOx4qxf76BNDbCZ8/wV','admin','ak_00de8093088e2dfb','2023-05-17 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$y5hT1yiNmHac6eQj9jlbn1b1qTGV357tgccdmlE4ijBrBO5Um/Qam','admin','ak_dbe35ba5e9e325ec','2023-07-24 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$iZwkFgnaZ3n47AAFMhdF8vkrwl9umBkp85rm/7PFxFKOaTjrfeX8S','admin','ak_0c441f24b7e50d93','2023-04-23 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$7IcZR2u.jw2AyAVA7ve4mFOP9Xiq5bx6VsfVlWhpr/Fa5r1znb6q/','admin','ak_e601559b60241c2d','2023-08-24 10:18: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=27776;

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


