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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$0Mw4BuhIe0ptN2Ux5Gjk5G88lqWijano8YkNZKmOomIYMu0uzlruc','user','ak_79bbd750ba3ade96','2023-12-23 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$6bjrBrO7YH20sQoSwR3pXOwVF0XHifo9u14N/FCT1tpFWH.Dm2P1G','user','ak_e759600b0ed07818','2023-01-14 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$wNwk1bK1yIMzZNi0QkNTGNs4371oBUojSLX/Pg81UfgnErUNKg5lv','user','ak_709c504483bf0e13','2023-09-03 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$012eKodf0zcrZWaMFZ/Ja7WnliJg8ZA7GYPNeQ/Ea0G0yC9w/Jh.S','user','ak_44937416c92b6188','2023-10-09 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$Bm32J6CkVpUGLadn07.1tIEoViC7MAWDpBDT0ihHiI93mI0QtEayj','user','ak_e2da3261806d4320','2023-01-20 10:16:00',NULL);

