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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$6LfTMCXO/hoFCYqPUBhZn1/BOP8VFfeGHj33fkepWfDuKFH/24aTA','admin','ak_834aefd6e1751d83','2023-06-10 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$vFF6.nut34ZpZ1DvQZgAFtNxNwkAeVm/zLQn6tNs9Lr50CHZFvL.S','user','ak_b44e7c7d9a51cfb3','2023-03-17 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$4jfqQzLqYocfPU2Aclx3JXjvWnRb5r.ItQegMUbGwkWF9lna8.zFM','admin','ak_a5b04fedb4d2ec30','2023-06-06 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$ptd/Ooue0CPx1QjJrn5omTNBgOL90B.btOe9ovKbnfSosbO2BfbGf','admin','ak_836e63a02f04a000','2023-06-18 10:21:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=45470;

--
-- Dumping data for table `audit_log`
--


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

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


