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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$5S0nnYbVI2ZQrkUMqy3D/wTlSEJhmsZD6oBqLaONTZFQnz./gTmVI','admin','ak_820a754214a82048','2023-08-09 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$E7qQWCETMhHFOKrKaoxCDc/BzJ5XyDaKCX4B5qJt7tPR5koWsfy86','admin','ak_cc4f0dad2cd9d966','2023-11-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$YqBgLzWUjH/xO5PGIbTxohwiDHkGOdemKkCOAomuKms0F0lKpjQqa','admin','ak_d89f5cf59ffeac16','2023-09-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$eHZ8p0TMFxWht5Y4mApV1/LqbbFFQ0YW3wQE.egCmWSnIpDjHw5sp','user','ak_25ef0411de97db8c','2023-08-10 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$5slbOAxCiFBK2x0OJJTrOgbx3TLK2yhJ6GI/9jOYlk/zhzjHfeLOB','user','ak_5364278134ba707d','2023-08-03 10:14:00',NULL);

