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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$.aX3AcVbW/MDVfjIy1ITa1E1NOqH5hsg0C/ixmSC391Pyz8ErXFDr','user','ak_45fcac69b48e47ef','2023-06-16 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$rwhE86BoDzLflSntdON/l4Y5kWTM3WMxlVfIR2AyRd77F2Mft01OE','user','ak_fba74f4fd459b0cc','2023-02-27 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$vDC6cIasqs2O6ttkVRXYIEPL9YKN2zmHh38MZDQiXoJ1vg0zoSBPz','user','ak_36e268e26d96494a','2023-05-26 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$lm84hcM3koSDKgPd1Wpy8jvrdDvXXxmeBHONJ/UenxBZP1uBICopx','user','ak_7d7df9f1288c5907','2023-06-20 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$Kqi/zJgnNQLg4Owmozpw3m4u6S5KKmi6MPgSV1isma6C8Xn2aAx0l','user','ak_dd935d0d052de18a','2023-05-09 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@corp.net','$2b$12$XW5jl0QnVoasSBAu77cqXXE7nmOfS04fQVzS0lCNHKffd0IIMRXQB','user','ak_9aab237018852b87','2023-06-17 10:05:00',NULL);

