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


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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$Fvdsy4cr.Scq25QzMcyW0SsBxHqQ.paPp2psajHuzCwibbnA76hrd','admin','ak_6a71da10fb11e6a5','2023-01-08 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$OkkN7pZ36KkO7JVXg0DwPjVXyjkJqnmpkh8p9KA6FMfsqABiL3BDW','user','ak_2cae5719b96432fc','2023-10-16 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$Br46Nwdfi/YvUnoA4H7Qc/5GinvXBPJ2aqozYsHqYkkClort4mbbE','admin','ak_b0fc45d44d150568','2023-12-18 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$q348WObNHbHKAvLDf0cARSwLgK8TqpDsnCoEz5DB2njn/ROnW7YkV','user','ak_6cb487ca9de12c40','2023-05-22 10:23:00',NULL);

