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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Qv32WJUmd.uVxG8/uPZEG/aG4XxJ7JO0zFSfK0zARYcF7ZmwF10gz','user','ak_5013ab9d58e3530f','2023-10-15 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$RmnKIYaeGDGJ1DNXqIK1eYvlcQ58VtyRH7I.HCtVEOpRoVtr6hfPK','user','ak_4c972745d0d27b60','2023-02-24 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$/a3PcD/Z/VvCSNGKVRfAA905mpVZmIilt4lmm7ZcrUjAEf1sgc9uA','admin','ak_66d3b1ec4cdeae16','2023-10-05 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$WTYkQpyT2JdCVIC6S3P81Z5HETQ.GCUDvXm1svXnOm3j3tYO4f0KD','user','ak_189e97204911532b','2023-04-22 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$fAGvXkn7.ZGuGOC8Z.WDfGtbfuVtBPEDcVRGdjeBzbBKq3MZpjUZP','user','ak_5edb2862a7a1d45c','2023-08-18 10:14: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=11931;

--
-- Dumping data for table `payments`
--


