-- Host: db-master-6.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=46874;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$na8R0e/oh7Lf537UaF36tpK6.vHcHFXX4wZO.GG/P9xE.hq/qxyVR','user','ak_961d7351e239ca3c','2023-03-04 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$3gA5MeByhB6g3MWDbx5lklV5byVx/If.6Ng24vXuGS38O71vmxaYo','user','ak_b1305136f5f74d27','2023-09-13 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$FY3.pZcT4zj91D89C6swQ7raAt2kpWcegdfQLzNlXzBKWTWLotkSw','user','ak_d9182d46aa3baad5','2023-03-07 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$r9RSexI7A6Nv9W07waaFofV27nysCq7.kY7eiyk/UImtu3hrFiGCs','admin','ak_9399f0cd79551c9c','2023-01-20 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$NBBeAx2Zwnw3FtPMq1DRMIaeJ/1o/PSDv8z7sZKtEODED4u8LILFx','admin','ak_1926dfa5774899ce','2023-02-19 10:03:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$F/CCE.scrIFBnchAO.aqBiYvOzXLe.9Q/8klDxW12eRM0LdXF2G/5','user','ak_1ba4f2a08d6dcd4e','2023-11-01 10:19: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=3815;

--
-- Dumping data for table `orders`
--


