-- Host: db-master-0.internal    Database: customers


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$49FEpKIT8riV7V2AHl518dkusYV49hcSE2q.yIFlU7G7W0/V2twpA','user','ak_4de2bc3172e4b29d','2023-09-10 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$nJTZ7B3G5SN7QGcQ32/gBoGq556HXo0ry.2bhTJlyEc4Lob5PaPwb','admin','ak_b6914673f6a94857','2023-12-25 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$KDpaYNVJmlmFYYKYycblEYVpxV52MurZtAZ3958hWbTwsc2dsYXvl','user','ak_e79ecd4d064009c0','2023-03-07 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$OxACogIDBM5/IkDclUnM.hoRfqCIvH04EiU/wLnzg.B5Cv6K5nE97','user','ak_330027889f8e5fda','2023-03-16 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$hvY4w47KRekJROYp4k//J/Dbh9efjtzhDeXY.8fRGeo312oeG/lJX','user','ak_60672b1fca88ba25','2023-01-07 10:10: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=5881;

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

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


