-- Host: db-master-8.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=18622;

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$/Ny0yMCWT3XD26sueQojGzEWCVHHgcci8CVf0b6KzA0O8INmM.q1J','user','ak_f004364bdd91d9bb','2023-04-14 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$lXXeT.DWYVxc6kqM6v2UT0cFX85Fu1HeMotl7S.6UncXIJPuK1j3B','admin','ak_de14a8bb5abd58e8','2023-05-18 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$OaYCjrWZmAKhoNyhcT/GBsluI1rGc8B3CeJi6xfYJ2VYXI438xYWi','user','ak_bf6538b15bb170ab','2023-12-04 10:21:00',NULL);

