-- Host: db-master-1.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=1241;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$PLJ.njXUVddosTYHLbmteln5NXAPSORTXHDWCLHqa5CkAoe4pUnM2','user','ak_2f0a02d03f2bb3ab','2023-03-11 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$aeQOlF32aQv8qdYkdoH7GnPif/sXsWZzn5vMO9zCtzZEdFDpY.pmi','user','ak_7d7e61de08390790','2023-02-01 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$MNwvdsEP/ygUVNsA5rsi2S2tK7BQ6oH9yPq32velvfXBftM18hRni','admin','ak_9a5c3022f7486b29','2023-09-02 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$bXIEMmznQQgPREv8lYK6z2/eAYaOWDdrDUxPHFYB97Uvnd6GVfNtJ','user','ak_a332e98874f02cce','2023-05-11 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$6Y.nHBrdKnwrHev0mWNP2dRqQZwFK/If.0kXEYOGferU3zkswQYIH','admin','ak_ada24c859d0dd133','2023-04-03 10:04: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=26611;

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


