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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$1JIvhizoicvpHu/zuS/9yxA/vJzxvaJs0zOb9IZ76czDOmEu20GLH','admin','ak_f71715e797317f9b','2023-08-03 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$R8f3qChGysllmbgVgSk40edvFLzzAMOmdJt82RoNZBH65EtWfdovC','admin','ak_10a39d0634b21c9d','2023-08-12 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$Vjx41hfeCmuB.ON/YATIdsK5gMm7b0/Zy6HbEo9GoXfbxZvlruBLE','admin','ak_033eb5fcd8151114','2023-09-17 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$bqgyz7rvQK0Bf4aIP6zdPlInacHxezh8RZeRhTkX.QLwaz/0ZIEaj','user','ak_89984138247071f5','2023-10-26 10:15: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=38621;

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

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


