-- Host: db-master-0.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$gEjQFeTIzfVDDJaHN55N73g9qwiyPoBqL6XffUEFpADrrdpTgVAkg','user','ak_ab5167387d767484','2023-01-02 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$3Q5YTzx8DPcaFwFcnxki9sQDpysu8Hf0NUZOjQ8PNysBEs/uhHSmP','user','ak_c740c00f2791f0e9','2023-03-09 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$uhgUzzJvvcbgMKVACvVcKkyA.o/l1CtAhLrxaVWTJ/cxU622DyihN','admin','ak_0d6c12237ce6d4cd','2023-09-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$dQLN8t0FA1pSWXcNx7zwYSwWHuMB9bGpfR65Gh2g.nbJHA2Kt1X2.','admin','ak_c4235078464f991c','2023-09-07 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$L..x5CzIzydVr4/I0dnB73gw4iUb5pCu57TiQY1e3qzvDzMfbbb0n','user','ak_637b36bb04b49c52','2023-05-04 10:22: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=14257;

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

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


