-- Host: db-master-7.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$MGZq6LOxOW8j.67NFUWe6K0TTC8x1RUvjm5yYZ.fKq2SVFRbTh834','admin','ak_1757d94730d63c24','2023-10-28 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$cTNdyIYdlHD9UHqlueNEhU8C2KqapKGA57Rm5bHK0oh2jamsgfiZG','user','ak_776e52d761eab08d','2023-11-24 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$4taJ5.tjticnfW5Yb62WEOpbW96bM2OUFwSk.S6YvzakuSZC10rfv','user','ak_e334168bdb148edd','2023-05-06 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$t/GWjG.YLvxNCAvT5Tx1bIiw7UHK2kyMa6K6e3Raf3X9ukwijjvPo','user','ak_72983c8a842b396f','2023-08-22 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$eeHF8dZiLt2Rid6sI0NkoZtOpv4.L0RfBootDxt29pJCbTisyWymB','admin','ak_07c93da3c633257b','2023-02-25 10:00:00',NULL);

