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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$QQm65k6f6wnIXpxISTYHHh34LSfajD3FkVvuvQzW0sZ1800hdc9DA','user','ak_9cdda04705c78b22','2023-02-09 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$0eBLmzA3eLopSGEXe98wvKlKNW.C9V7kB5TW.2FCQBKxFz2wmVEBe','user','ak_57bfb65ad896a180','2023-01-25 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$FsjhOsK6WjOcw7cq38mOneuI5TPEgXN/1xoZJHztT9VL.lbuF.9jc','admin','ak_ed58656f7bdd0a38','2023-03-20 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$tHkTNE9UvoKsGCO7hqRrRqcQyNqk45X27Bk7T0za3RM7lfut3oGsC','user','ak_a473fd2cd2cf1d07','2023-02-13 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$djyO3ZvCD7Jn9bsqj1Cz/1XQeU/rUoR9imr5HUa1CUuHSfm.pdW9C','user','ak_ec550412a9263f0d','2023-05-24 10:02:00',NULL);

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

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

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


