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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$MYro7upyINvi8/Xk6Cb11gI9Fj4g2gMJ7tNthz3Pr1jlktn6/Uk5w','admin','ak_d6214cfa02c269c2','2023-06-07 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$jv.6UdGhjZ5T1P57heq8IKasQNOGOzASa.mt6IXDA672uAcUi9clE','admin','ak_e13455eba5dcbac5','2023-12-02 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$9MxB0./Opcv7rSLXxSeZ6NQiKwYos.kIk5hTAtWVvCinyVIgCyrDz','admin','ak_97e1c04b7ceec6f4','2023-06-15 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$ESNjAtso/H/pb8WOrHSCfIZbq3RpXDuvOhvUl04GTF7oIZXVVmdTt','admin','ak_3d23d12aa473abbe','2023-06-19 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$i78M3rFdAvpir4ge0hWEH1ZvbnZ8QrYQQ0VSF/YZdyC6D8k/K8cR4','user','ak_46bab8ce3b8d69b3','2023-08-28 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$YogF5gzY/6s9txw1hJJpKnGcQjFLBYtcIVZnRFj/6r07nbqbRpYBG','user','ak_349c9d604d870aad','2023-12-05 10:10: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=19811;

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


