-- Host: db-master-3.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$BkWRrx7mpWmpBcbBTSxJwtwGpjmMvMMu3cRV5yTZWKWu/untKBrF3','user','ak_6139055a7efda9ed','2023-11-14 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$QmtSru/tLQ22zIkqrcTTHSP5uSE9jfjuWcWlWHcWR8HkZxgvf/wol','admin','ak_774ff6875e6479d5','2023-03-27 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Im6dfgx0vQeh/P.VGTmGNGRrEtcHosdVX7bOHRsn76XQUgVecIZAJ','user','ak_42fad695e1c2f77d','2023-06-02 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$dSi2/TOLrYNc2GrpSr8qpoFQuhNnmyfcvd0HSupOsAHUL0NC1wZRK','admin','ak_78c8910cd1ccff77','2023-03-04 10:01:00',NULL);

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

--
-- Dumping data for table `payments`
--


