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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$IDYJz1ugkmQteB95dTPnSyUluVp1fSyuv43TnPqY1eeNK5NGX6wjv','admin','ak_4c65f3c485709b09','2023-02-21 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$1tsLK2b4fkiZ9G5QdU8SCogaBwuZ5scfSdIGhQ4LSf0h5TQ7ezjJE','user','ak_6f81991858b0e8f6','2023-03-17 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$xgG13/wMc3QPVMPLQgq65VnfOD7aKy4mExSFuhJ0C4c38GrYvDtLr','user','ak_284c3936eaa85e04','2023-02-23 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$ZmmtFQdIIxVRrmV39FdBiGlyH0bn8sGQXt5KTJU7mt.dANonPEnM6','user','ak_c96f540851b830a0','2023-04-22 10:13: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=31479;

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

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


