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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$gYI5251G1cRD5CyIS0RXxGilKRPb8bqDr/FhZH5VDc2RqG6ITuRuR','user','ak_3ce92946a0267667','2023-03-17 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$EawT0tV6QxOVTVCstedNO/tjHBbYcBGl6.ig3Qlw/glTUT1EKG134','user','ak_52df02164d950998','2023-06-18 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$8EzgB5bwGwrU.3LiEfORIKkDamExlfImPWg85O.8YdZnoePgcxo/X','user','ak_d229f3bc66974f5f','2023-07-02 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$xv8NSqheTZzWyp5qcApdHw1tgHZLz/GunH.p5y2qcaTbej81MWe.W','admin','ak_a65f10de6d34a151','2023-01-10 10:18: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=7052;

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


