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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$sUBVx5IbVRAKuHLOPzw8J2ZX7q9N98XlC5.x5pqO4WxMXcxfG9M7s','admin','ak_2181174fe25523d1','2023-01-23 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$hNw5/uNam9y5v70oIhdNpjYBophzYsfKU0j/F5NS9AG3oqnAQO4uH','admin','ak_050b5134d74f0b22','2023-02-27 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$QN4e0dFk30bVWGRi.urwjUfR3rrymBNhWCqT8SakEJ8kfVp8oVUR2','user','ak_b0b0f26ff20d7a56','2023-12-11 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$7AqR/y.8c9u3RsekDiFQAgJqk1u6AWCQGrr4VcMSqCli1Sz/5rgta','admin','ak_0a75b2f3a4e308c7','2023-06-01 10:16: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=25596;

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


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

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


