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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$Hp.tlo9t18A7S1ZlsDYmuNgRvCyaz/MHdihpzQ7eigPLyAN55Potg','user','ak_f559217ad1791902','2023-10-20 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$xmPX9b0Dd5oQRZDgB7KNfztGWLO7rZa4lEFSlcwPTMc7gK91am6FM','admin','ak_0f53081457ccde25','2023-02-12 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$iD0kJKwjULG23e0ZaELgCnk0g8fLk5vv.FdcOVLNNJDYmtMB0Xhtf','admin','ak_9fb1a51aa611e6a1','2023-05-28 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$NVeBuV6qKvWM.ZY9b8s5dBgCcBa2pD3mDC6lp28kNngcn.QZ.gZ34','user','ak_906cf107b26e2b33','2023-05-12 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$BfpABiAJ6/hv2TBjNHGPgmMaUjwfeNfMGci3g8k3qG7.qVk7iS6E.','user','ak_71b8a9a9b4be7622','2023-05-13 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$1jIhaLrfDUID4QLBLWttbr54/ezi6CmgUj8i8T00xRyEim/oWMkMI','user','ak_ab2168a4564904d5','2023-04-28 10:09:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=13943;

--
-- Dumping data for table `orders`
--


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

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


