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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$NxdaTXbXz1Iq3JWACrUy5hVCkJlnAdDOTI5RqWpiBwFtoNnE1S.zX','user','ak_9840da7f94c42b56','2023-01-27 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$FdlZNJGrUPHaABBIC4GVZ9/gyNq1VMr.GYef9nBnp2apmBT4zaljh','user','ak_8bfdac35c14b0ccc','2023-12-08 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$9MShAL1kryvCSFKMUV/fws/OAsLNzMep/KwnIy3PJvdoWSVZV8JYJ','user','ak_40a48d4973d3df5f','2023-01-16 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$F9S4PlhiaVRlaGfBgFGG8UOmTI1ViKHLzsqSNe.Be5ntqZb5/AZnC','user','ak_fc448d1d99dad344','2023-05-03 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$cv5xv1PcLJ9xcNclG8WyA3ebiIc/5PeLIwL/JGIxCj/6jK09Qy0fX','admin','ak_6fb0d8f726b52255','2023-05-16 10:06: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=15248;

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

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


