-- Host: db-master-2.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=26665;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$b09JoMRkHXyY84AcNufGLveg/7RQ45w7.5MfhvtP6KrmqyZQuLyMM','admin','ak_f96862bb94230447','2023-04-13 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$NcBdKAyEX71WRs2BVHerIW0QzrBskraI.vI96R0UjN/fSCBl9XgwC','user','ak_23acc5619cca9f83','2023-11-03 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$SeXaoi3pLOO.UfDz0wbOHHOlyYf6NRiQaAWacMmCK1b1LzwU7/cIP','user','ak_2d3135a24efda518','2023-04-02 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$1ZSqru99m9oOAJPvj1E1I9Im8UEVZlXiRUj6Dqq9eD.ons/zyP8eM','user','ak_b3e57cf417d3fabc','2023-05-10 10:06: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=10263;

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


