-- Host: db-master-8.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=31576;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$BzCfk8cXZlxaWERxizSifVzCJph2HX6.CPBzAnktEqpgmMVLHgD35','user','ak_afa0134d8786542a','2023-11-17 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$5vjIzrrAKBRzzNblTX1ztJtb9haPbi25rhEzcJqdRqvfI4Jnj8yuT','user','ak_82cabdc85baae2b9','2023-12-02 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$CMSS7iP102Ri3UOTjYuzTbyeOL2PFREtr0Vc05DPzWB5/Dn7fIi3M','user','ak_a30478abeb9f00cb','2023-05-11 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$hQUzyViuZD7ZCWD8waP2EVeIY60f82SGzUFWPGvpuVPeObGJ/79b0','user','ak_00776f46bc7343f6','2023-11-11 10:18:00',NULL);

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

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

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


