-- Host: db-master-1.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=14983;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$8xaEcjPrfH4Njvg/vL8ie/XoNZZ32Lw0VpWE8c7nwb39AFI5408R5','admin','ak_0a36a0a65bad2d95','2023-02-10 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$qTJu.kJuZ/brBsTLv6.NkCZ7ySaeif/6Mo07tGiOX834jBeHPnPIf','user','ak_cc62cd27d9c9f8c1','2023-05-04 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$l7/.iGrcVVPPwn5yOytPKj1z.RCLlQRTea4hN2oyZPhyOeKXJUu06','user','ak_ed39019dd375b463','2023-11-22 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$CGnEuZi1bcDnwb6kyb8O7tDTnoC6oWuytpwjNVeeFclxyl75NwpCZ','user','ak_4d4a64364bd59871','2023-10-22 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$Jum4iKLnX6EtX3Y9Jlk2aM/5KPeXbVAwzpUp/aA94FLdI0akRMkEd','user','ak_179b5079fdc45b7f','2023-03-25 10:13:00',NULL);

