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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$FxvOvrs1UbHmpFXWU8Mm2Ut8Uxb4d/Up2KNewHNp85mmvhvqJumOr','admin','ak_590c4396e969b975','2023-06-12 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$7Dyp24jyhznM5Hc24eiFqbzZUz1zG9uTNLbz2Le7xJxmEZk1cqMCt','user','ak_7843866a23855d0c','2023-04-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$x7DVbBzC.VaIxXq9kG33cdkj0YRcIJQdupLbpTDpqThFu8EGo0azM','user','ak_646dd0194617d6ec','2023-12-12 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$DrhNxWUSw1ZyZGOaqaiFMgpxrjdfCaDWCiN7rSeE3hrl9Og5eVBuN','admin','ak_074198d1d97c9809','2023-02-15 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$tEW8IbgMjryoEl00IzW2xKbOJxUrJBJgY4TUpZbeGA8gHybeNguam','user','ak_96495ffbbe7963f1','2023-05-16 10:04:00',NULL);

