-- Host: db-master-6.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=12690;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$l2.SJ6wpckYR/UqWVnAzzBGoRXn0tgUEz5.UScEkoQ58LA1mGp9uF','user','ak_1f2228b3a4305e3e','2023-04-13 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Eq02L9XwoZbArRoxySz73aQz3uiksAZP1PvgWipUaZGRUAeONQP4v','user','ak_970a2f9818c82a79','2023-06-24 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$okFf5bIDo.DbedXZZzHOZGqGnjN2PFJOTstwSDsYTTCudNaILP3Dl','admin','ak_a221b819fadd1d28','2023-07-25 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$TJqwdFY7Vo8il1Ck5AYl0vDfnNOi51b7CGi/GPnvH8dodP3B5NWwv','admin','ak_458eb888299715c7','2023-07-10 10:21:00',NULL);

