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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$FLm9f92L0Op79fXUts.feizDpGoipiPjSTcpr63mPLTdc2M1qZKH7','admin','ak_3afdde44cae85721','2023-08-12 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$c51Xb9qXu1qZI0smuGCbVsy4n3ZbIcM43Tthhmw/Vn01MhDeH.NeM','user','ak_535910f2b3e16ac4','2023-04-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$bPvv7WWUkU4Pt7b4MufSQAvwpFWbuW3E5C0KiGVviMiGKvH24zPrY','user','ak_9a8e8f1f82e2029b','2023-06-17 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$pHcjydv4CV0h1y5mwRYUHjG1bYwW/LTWu9D0NAjY40IvBBp/KTDvU','user','ak_8136787e299bed59','2023-03-12 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$ZIqe52Nw4L0njjRyGHYjM3o22tH0tlHIQIW/W8xcB14d79t6mrcFY','user','ak_761c20877b2a09a0','2023-11-08 10:12: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=16294;

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


