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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$iDQTK0yPHJhqxO1YoMDIOSgGSMfK3btw2Vhjq677.FFYtpVyepQCm','user','ak_353553bbd1660472','2023-05-02 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$xC1I8iOnQTGUVpIsZLK/xy0Xs2vhuNNFX1UXS/KDRKV1rWSq28er2','user','ak_1b2c30cdf354cf31','2023-04-19 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$D9J/CxDop.OdiWnfcAJ/W1NcHOnFETAMgbT1L36IBGWn330qL8IGI','user','ak_96ab3c73500e6e22','2023-04-12 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$sZRjR/sZSyTZ6xKXoKZLcyJKlkCF3qfZuKN0psu9YiJjMkW41gKw/','admin','ak_63733a37a051ba08','2023-10-20 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$5/bvMsMZCNxdGqFEiVilcohPt6tYnNeAATYBhc0EpvrgAqbRDE/2z','admin','ak_5a963ad0635c9f3c','2023-07-17 10:04:00',NULL);

