-- Host: db-master-3.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=31989;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$ZGtgSp2NkLuJb2WiKjCzpCWzDyGxGsCT68SnT.vZcjI7Zk3Evabg/','user','ak_b1fed8a6d850d3c0','2023-01-24 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$6OLT.8krUpsZBnlmfJuzr.D9jlemUHF9I577IW9xl3wFOdkeAifTM','user','ak_d158b0630ae23cf8','2023-01-08 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$AHiPSjstZSF5v391uGMtIKvdDw0Y3SeYG2C85lKqCB/XJZMctGMZw','user','ak_40b0810546ba4cff','2023-08-22 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$QQ/FtZ5rVkxT2ObZ8NqV67bi6AFvm.RqmX1xPPN2gRTyPFS95ugub','user','ak_9dc77ccde77e2eea','2023-01-20 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$pyuVPcNzAvi642csZUK4lWWGMp7bUgeUzjFGg.gc8f7PTOuN8lyir','user','ak_0ba3ef7419642b02','2023-05-08 10:07: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=50881;

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


