-- Host: db-master-5.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=14747;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$kMmuOUosWU6mIae2koRedg6Y8Y51G9iYxfPxRTO6FZxEvLL0zm.Vd','admin','ak_45e59ac79a132341','2023-10-13 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$4/USfaYzlFGZyXPt3hel3GuhnhzpE5xIEjHMEAygm5xS4j3gpgXpl','admin','ak_15d8374d63aed231','2023-03-05 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$aT.D1ydYpXjn9JIg.VaJpCRWjzao9bsYUEWzu/sZPC42NHh/2VQAx','user','ak_e71ef240dd711775','2023-06-27 10:01:00',NULL);

