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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$.eq4IaEbOp.I7RjApCQix/Rrys.c7kxzjAzCLC5airtrOXWR/wlK1','admin','ak_6ad79b103116fe4c','2023-02-16 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$B7UCXcL1p3IJEgMI.Db7RY.jmbsvzpERX5diBi3vmOmErY9Ylom0O','admin','ak_a3b4622b55a92406','2023-08-25 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$REWa5sqYQAfrYmm4ITmUJTnkJilj002D0myo8Q0xqeocXqoV6kGAp','user','ak_e1c412c2165855f4','2023-02-10 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$Qs0x5wtIO1KYTX3TLHwTLVx4BAh.9qkjZ09v92eRgTgEFT6l0HDwG','admin','ak_284b31ee02b28eac','2023-08-03 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$Y.Ui0GxnJiWP0QFYIrKMjj4IGQSLpKFTEGD1.pzYXiY.RRw3FhK0w','admin','ak_846f70c5db718172','2023-12-07 10:12: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=18604;

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


