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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$M7UNEHjNDPRhOyd8j3UVlYd/cMK8MF1hSQimetPg3k.Pd4ZzZlqgL','admin','ak_0d76f65d3060ddab','2023-06-15 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$dlvNRSfRtEDB5TCvZ9tv4RxXylwjTgmhZEI/uZQJaUv8oAPHv3VUB','user','ak_cc18468e39961b35','2023-01-25 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$utxjA.kIWIjR9tOuziot9PmxLJaamQ4aXDlZkMW1w/o466c/pVa4O','user','ak_b781d725d1c1fd23','2023-08-17 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$QC3onIQuHrT/kuBtywQclSOM0QcE0vqNZkBRy9HbPteb5ilKcpQ6d','user','ak_4c285d6edab66b98','2023-08-13 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$9DNRvHtjhuQ04qDdY5UTrLXkm5x7wOneBc.79YqZ7AjJAhH37tqiX','admin','ak_4b14715f7ea60537','2023-11-24 10:20:00',NULL);

