-- Host: db-master-9.internal    Database: main_app


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$OMfHmJfWjQb5chJ/ubRh5iMoUVDFaJG86snb5aZv4D.z.1kmfysgY','user','ak_dbcf27303ed85f3d','2023-06-15 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$.0EpNB/vwDpj6lDhdaEdlMB1Hcx64UvsXbR4PmJ6Ht0emMxh3KzCQ','user','ak_69568d20e0c8de31','2023-11-09 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$OWO8mqRwxL0qqemVaUZhNU4estBODoVlw4zTPTwt6jTlF8LbNLtjj','user','ak_31d4e7b993478654','2023-08-21 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$BN4UWRYdnWfrHCY6iPqWJfogkRqX89fAsvQbjnJ3.tmpa6Rm0AWo9','admin','ak_3e3099215373b584','2023-03-06 10:23:00',NULL);

