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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$YNW23DM.n655lpxchY4btsU4d7glRRkcvoFd8us6pjUO8EyZdP.io','user','ak_83542d1c80854ab1','2023-12-19 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$LYngyYDQuH.9RmlVpmERjVQV4C/.Q9BcFCYXENecesGa1aB1fcagV','admin','ak_e8b3855ed066392d','2023-04-24 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$4T7CYKzb0NzHofzwWPoUbDhY/3rhk.wOfG4XR7ecxaSHWswHdjzlc','user','ak_6a0bf25f14dd4dae','2023-09-05 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$CBebpFwAWe4pA1TUSG/ZJfe7GnkB/MsaxUoK5r72654BBJgbGBsub','user','ak_f077eb97b7676f0f','2023-06-13 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$DtLbFf6MAZj82v/Qr7vXwfdWJKf1bF/e3rye4X/tts4lNSNyU.UGc','user','ak_3b47d8fab1914fc5','2023-08-21 10:17: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=32763;

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


