-- Host: db-master-5.internal    Database: production_db


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$6RL4cveBhkFa9/Gt8ox3Xz1hO/eh/pLNpHTWTzghbF2bpj8Cd0AY7','admin','ak_fb01e233c9a415f4','2023-11-16 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$prXh7E62cz1OCTTriI.YPE5RU4aR3CxY8uqXfJPNI.eyTo/3WgpV4','user','ak_e1769421a07e24b9','2023-10-09 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$ptCllVCapb0MawifZt.aFxTPL7k1mscCytUTTRiqunSMjlFrSD44u','user','ak_50b3a47e983e738d','2023-08-05 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$P2nqf/rXc/DOiJZsMI0wB/XMlYSq4uBPUeQIAJ.z7SCFtkJm0M9KY','user','ak_28f9eea713c0c26c','2023-10-24 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$cfjDVO.YxL330eJUxMG1Rtsj2oloUqXprGm5gxW.O8nt7gzqciXJB','user','ak_467f7ed52ed85120','2023-12-27 10:15:00',NULL);

