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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$o6Qa/OQmZ/39AafjII8e1rBzFnPZDlpeg/xlLowuweFVnBHlvCXL1','user','ak_f2472a3a065bff42','2023-02-23 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$BUzjvRjfSS0q4.9HHtd7wKNvLSJp9c.9G9I0muBGS3k4HacwLOGK5','user','ak_0c86a0210d54687d','2023-08-02 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$hKxNiRTklQ2At3lN.oN3z/hDSmGvQurfYyYra9sToZrbrDCfmdlQ4','admin','ak_19586e6b0922a04e','2023-05-18 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$V4mvgU6xWEgb9NI7Vlg0TzRDXVOpkm/49vX54/b8WDI0Nzx81WtNX','admin','ak_8b7693002e98d7ab','2023-03-25 10:19:00',NULL);

