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


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$THZXA2qQ7dobGVUBikU.Mn1A1bK5F0HvNzZHVfgFDVEDC48v1TsoT','user','ak_81e2e3b085fdfb78','2023-07-22 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$EfcCUCeXr.AZJIAmpGF74bg5qP45yaYHKU.UxJ.3diEjLQQTLoBjN','user','ak_4fc16ca12b518d80','2023-10-03 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$rvhz1DSq4fLb.sIbNwrhForLlNlbOr9zGcnX4dbyqrGznbQ0QPCB9','admin','ak_c869bc170605f745','2023-10-03 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$51FO6KvH/VCkgqcFqRU6gPw1VRhN3RaaXVwxumN9zZcfID.4zmM4U','user','ak_d935cd2b54bd0f38','2023-06-22 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$ZflGKH7HSqlh2l8INhD12LD8JxDd1uvB6hnO5P3O2fQKbq7kiH6pO','user','ak_00e8c955b13df227','2023-03-21 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$csSbXKNt.sAaZbsafyP3Umwa7tfO37Y76HwlKuD3t90ECvT7cAD0Z','user','ak_7e45df6b75660ded','2023-04-25 10:08: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=11086;

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


