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

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$OYXko1CZ8WCIRaYRx2dnUcWEMbrBaWAqP6HyzqNcwFJELg5FGp0hK','admin','ak_622ddeb56069e2b6','2023-07-04 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$P0i1QH6pRaSUAFaPxpcJ/gdEp1jJbCvQ7dnlok3BeiR8trTKDCB0w','admin','ak_12b25bbcb513c7b8','2023-11-02 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$Av4woMoEZHA8DpPyL1KUK4tKpYXkz0uz3Ctd2ymfhfM2pIgocWKW8','admin','ak_b5d849f411a467fa','2023-01-28 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$Fx/45VsNJMhEeb9rQsyrrHn1c4jjCC0P9A/OL0Uv.Fc7iPvXyr6To','admin','ak_d96769fe58a7d8e1','2023-08-17 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$ofMNe7m1egxJGwHRBEAJrrV4Rd0Qr3I2phvVuy2KtNjaNJ9aknvz.','admin','ak_3f127222206d6775','2023-09-28 10:08:00',NULL);

