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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$p2xg4Bx4.irYMWqww4SMBKxJoLo1zuR6MvXKdr1sIhMsWYIV2talg','user','ak_cd152d866a580850','2023-08-05 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$OFAuEnMCxXx2POmI1AAUkwTzBLLSi.KtBXo8YL8PUf0bL8OxqYtRy','admin','ak_5ad37004bd7e2f24','2023-01-09 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$6MVmDC6o6iYNudgdUwpOxNq07t7um/ThJerDuXEOTGany1T8JfUT.','user','ak_4f3bf82884c28b3c','2023-04-24 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$0CiN05wU6LHBpFfMz1oauHNfpP/U3QaUBKZka6sXLok93pmS/ksKF','admin','ak_7fdcb478e771c34f','2023-03-22 10:23: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=13331;

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


