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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$PxH6iZywzoxu3xXlutYD9SpHVpKxOP2xNbs.UwqQh0GleAqqQEuVA','user','ak_38096ec0d0d2168e','2023-08-02 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$Yq0L./PsjXpKmuMco30to5LnltC5wHyIJgZAoZ7TN9gaJmXr6lD3w','user','ak_4fdd12283135601f','2023-11-11 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$QGej2jtsSsIsI9ajqoY6Kyw/J41IaEXy6levKB1XgUUVAITIXUrtZ','user','ak_59e5a5b83c3a111a','2023-09-06 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$mQOr399pWbKW57WeikcM8ooxXWst4P66gyYjPfH4B7OZhLXlmD9pO','user','ak_ecb16355961dd140','2023-03-14 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$nUWo6r4MLZ.TLniFKU.UVcI7aTYa5VRN0QCI32om7pCh6r/.wzN1e','admin','ak_78d19c8b1fb75e53','2023-03-22 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$k3TBNv4A5f2LKLDKWKQuxzifyezGVR56VJ/yjRQKp5pCTRJP4Wld9','admin','ak_b177325d16cb4dd2','2023-09-17 10:00:00',NULL);

