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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$McMgYScZBet/lsjzoSTdCbUqUT1e5OTOgYdiUt1yPGnfk2zOZQIta','admin','ak_d0822ef17a35fdf4','2023-06-28 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$2NmfaLhLPFo5yfXiH17KPZCGVnW4CnJI7vVOBPWmve6mZY6Ac1Q2B','admin','ak_22767ed928d395c7','2023-05-17 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$SMrAYyrx.qOXDL6BR2YBD6C7w6SSjPOcBh/RmtFkb5nfNpag1EhGZ','user','ak_8fd50c656ec250dc','2023-04-20 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$CWxJjr14lugrHhUYKgtq6Tf3LruBFlEjCbO4os26k59.bHoOXZlSo','user','ak_f5a823e212aaa89b','2023-08-16 10:21: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=49952;

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


