-- Host: db-master-4.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$wvzm/WuRtlvUpan5Jrd.9/VTGSFWgk16ntNL5kcNF107rQJsQo7QK','user','ak_49b031cb997db979','2023-08-05 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$Hk0PyhtbkrKJQjHSDISoPzf8D8TK2D4axNzQmpVwHz1VO.ssqeIhu','user','ak_472258ae9cf1926f','2023-09-10 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$0JGBipFdrSQxZ6qI9T74ERye/wouHT1iv5D7r2glmV5crAzuatSjr','user','ak_62363148ff80f21a','2023-05-11 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$Wt1dZ6L0xb/COTLB.Kk4latf7bRWWl7XaPDhGL/lWNANkEUHeme72','admin','ak_c1fe1ffb73718a3a','2023-09-14 10:23:00',NULL);

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

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


