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

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$zDisZg5wKK7ytfWrwDXcv997UoQRtMbrRcimCe.BCv2HndZmnYbR1','user','ak_683ae2c2ae4d7dec','2023-07-15 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$nA09FMuN0xgKhSA/n08ZN79q9raEE4kO9MuYY0mXQupK2JQUK5VBt','admin','ak_601115b484762061','2023-06-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$GhQYuMj04yj.82IhkePaIiKM4FuQ/5I8HT8c5cI9VJeuu0mERakke','admin','ak_28d097fe2dd4e60a','2023-01-20 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$7Wo.FmMow8lfiDlqWsOo9S0l6R3NLnJ6GfIE9HL8BZ1Ap4nYIlrST','admin','ak_7943e1a5a63c26f7','2023-12-04 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$k8ss0oAq8ulnPy9mXJ2WwTAM.4LcU6brjRf7oUiRuVZbWdMeDrGAH','user','ak_5a5f1049d1a99ef2','2023-08-02 10:03:00',NULL);

