-- Host: db-master-2.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=47316;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$wciR/HqL32xacoTtTD13mX9Jw5qPKbcC.LPXKAJcUtr1ej4PQckrf','user','ak_45d65fcdbfea80a2','2023-02-05 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$GmGX4geZkWcLKo2RlxaxQU6efnlIU89e49lKbwr.DyItsLl36PlTc','admin','ak_eb31612682d93295','2023-02-03 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$H5ITWSaniWQRR5saaspID9mvjeSfOMatWOrkVJidlX8.Egqoae8CI','admin','ak_bbee7c35028fa226','2023-07-25 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$augLe5D7IeC8/U5dQ89s1b3tfBYy/a592xxjkqdW4seg7a4OvyYh7','user','ak_794100cfc1d672d7','2023-08-28 10:23:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=19627;

--
-- Dumping data for table `products`
--


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

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


