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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=5601;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$mpnbHQEIcBu3IiYLVx1kBOx.UHv7Ekuo5gNHT5fvml8tbvtzrPN7p','user','ak_b3a0e39e3df3db7f','2023-06-19 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$Mon6yCYMTtI4BX9ESbqLUtBn1iru2pUurHES4sBC8KjfFLTNvfPyV','user','ak_4e9ee0b766a23996','2023-04-14 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$o7FFWgTYhhC3Jgd1sWWMDMLP.rM.nSqunmYxs8y2MS61jsYXF3qsF','user','ak_e749233d4e683e9d','2023-11-20 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$G6mt/y.W3JH8hsGs2yzM4XvBSWQFqZTQovxMdrUhlczuabG9IfzDR','user','ak_9ad55a349b517968','2023-11-28 10:05: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=6602;

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


