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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$prFQh/PbhkFbp3zu.uGw7rHMO.cODM6vUEt59kRCC3ZM6Z3GfvcY9','user','ak_921178071cfdd0fb','2023-02-28 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$nBHOPTg1kQvjNQHoT3u/em7smYLFeYfOADT.XB3QPaGQgHDHLUN9J','user','ak_68e2ec8773723c64','2023-04-28 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$ODIjSNqXrhPzted5tQpYER79T.C4Zmg4CWzA2MMqc/o1iEZpUwZdl','admin','ak_1ec51d52264ef9a6','2023-08-12 10:14:00',NULL);

