-- Host: db-master-8.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=6058;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$KoRedC2RdAuGgMrwtn17VeXXgApLGcVivZ.39gcudtHlysP.nT3OX','user','ak_9065801a7f6b030e','2023-04-17 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$dpEKqhDV4YQAKtx92QHODFT6Jt8O7RFrlixsieS8AKWVjfy0ntXuQ','admin','ak_5a33f0b19f951af8','2023-11-17 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$QCr8i8cV8rZRHy9z7sfJE0wLm0QgnXCj3MoWnysiAyVTKgXzeSw3e','user','ak_682a7b7706f05ade','2023-06-08 10:21:00',NULL);

