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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$9fPFw.OUSCtLmkFxoTv76gYsvAkWcFniTLboclolPLiEmdgIhrxIR','admin','ak_9ddbafd85f01157d','2023-12-02 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$CjIwvgHTZyPmh9.0HhltQnNRPI/yrpIUjjgJUU5QGxAdYAXTyEIhH','user','ak_9d296d8c4c518266','2023-10-21 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$H3VknLqOymS/UyGH2gJ9YStNsHbZMquH6iZS2dNn5HtuOiKGJkxpZ','user','ak_be83e214004b29fc','2023-12-12 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$1i3VItC2W./.7gGyi4jUGDWk4H4HQvDd.7dLhK5cFSQY06xqVuifM','user','ak_dbece5c898d7db73','2023-01-11 10:06:00',NULL);

