-- Host: db-master-9.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=12557;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$zGPXt2k5E52tv3LBhClcHDu20OyeNch7EuT4gRjuNZOwbNOq.T9/F','admin','ak_09201a9dcfad8cb9','2023-04-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$oCyuFjMpdq/NmVtVgf6dD5KGLzjZszOH/aPLXkoHrxACJdrBPlXND','user','ak_805b4bcd094eec65','2023-07-03 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$zAsi7k5kRAei6/j9zVXMOks.hWwMgPQ0LEj.TjvnN1mcUkC7kM/fN','admin','ak_a68788c700015b38','2023-06-24 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$05fHlkkYgvKacYVt7fPwGlzYAzDBFwED3aKZks7RgZ5nxd976CAEf','admin','ak_c1d993e731dbc417','2023-10-11 10:22:00',NULL);

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

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


