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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$YFzihFsJK8Qy3tR5cxfOoiBnwS6D3zgsIlSKgKVTgED0iUzTW677U','admin','ak_8b3e3f8f4c8f61c6','2023-10-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$IHxLra2KPXgOWPyjs/gmnulWUktgGkPv6wc/hpGn8gupZAmqgUnR3','user','ak_7e785d7f60698b66','2023-11-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Ljf11lQRsTZg9Wtp4nHz1zpiyhjTAvUbdP.s7MRvs1cWNafdnomDQ','user','ak_902fde110b13694a','2023-05-13 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$bHtk67ABr0ppGug15oukabUfxepLj50c6NqDPPhoRET.idgOt0lvV','user','ak_a02b86e76607cece','2023-06-01 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$uM3MJkHUG5ATaKQxdA32mR9kxaw9xD5Ne7NCnWgttTlE3o/7wrkxE','admin','ak_ca6337191e7ce0b6','2023-07-15 10:14:00',NULL);

