-- Host: db-master-8.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=25382;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$mje3pYNtub3xVO9klJ7iMjEKL1ef0OrXQ7TeI0DRmUpZiicajzKHe','user','ak_6a093fe2fb140d5f','2023-04-03 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$Hvd5Astjun/MQHWj/BkzTUqf8OLHi2KowGQTUwtONYL3QGoPfmAMf','admin','ak_a7ed6cf341543f60','2023-05-07 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$45BedIV21nzW8Pw.ubCgI5zv3sDVDHmS5/bRVlFtVhrdx6n8yQERM','admin','ak_a7ce525e823b22c9','2023-01-01 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$2ZjQAaz5Q1z0eakCN4Sp2QQMAadELYtghFvJHoRjPSf25tM6vu5Yo','user','ak_5aa6c85fa80055f0','2023-06-01 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$dcY/rMVOmZuAbAeqmvGZGI7cgtT0VSnVPC56nu35V7phKTzTN0hc6','user','ak_f6948a4f23b5bf26','2023-09-04 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$n5t30aELcDqrMX6JgF/AwpdeLeE2NNXvWf9m6yA63z1cfhx/7iAze','user','ak_9eff897edbed5c25','2023-12-14 10:20: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=5801;

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


