-- Host: db-master-0.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=11180;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$fS7rbyKTaidWkmI6QGYlynGtCt1nBZ3n588bDoAag9zlRvdwMu7fH','user','ak_a786da4f53c32ccc','2023-05-20 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$CCiAsMOtlnf2Ahl40TUsP9l7PhgEG/oQqgQhsafVdsn74I.gUQtIe','user','ak_5c3f9ff0610bccb4','2023-07-20 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$289lc1S6gRX6QscDhG27QMEhE1ySicsPpNz3rS75JeeWQdGCQgS4f','user','ak_374f63ce7342d3ef','2023-12-21 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$PEE1iooee9.wMPOYqjwZm8fwN2op28tKqatKp4xGThIKMOqWGP0x6','admin','ak_012593c01dfde9bc','2023-03-05 10:15:00',NULL);

