-- Host: db-master-8.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=5642;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$T/q8LP18j6pM6RBny732KDf4GIrqQF5qyYb/c/S5MudtqgXpGMR5h','user','ak_50fcd91da484e27a','2023-01-27 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$sh0X3nqIxjl5Q9VPF.AMGnz2JbDu.d2ybjlO7L8HYt6cn3TTDkz5b','user','ak_ba38244fa77b0c9b','2023-02-01 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$MHk7aJJYSBl2X1wQB4siITpiTziF4icKtL2khwRXoHiBGFYYBAY5H','admin','ak_b98aca5a7f337d55','2023-02-19 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$8vKEavj/6Bee6HdktKt3zAtYjxANHOCbtvtD2o0YCkTmYZo6dtSxh','user','ak_ccef14bf52a162a2','2023-06-18 10:13:00',NULL);

