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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$ne45k0qkPVyOrNeBQ0zP0bHi2D5AW24UhioGQRXTVvP7VFNB8EJx9','user','ak_8023ba3fe322a02f','2023-10-03 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$ScHdKZA0wYG5xFlv87Ij0Mfz/4lL25ePPscdgz0u.ovldHSPzO3rB','admin','ak_5fc40230f37cdb28','2023-12-27 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$J7ly375LwUkjzR.dkFxdcyLXkKYOFbBkL9Pof0.5TGr3BleB9r77O','user','ak_0e5ab80b84483530','2023-04-28 10:09:00',NULL);

