-- Host: db-master-0.internal    Database: ecommerce


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

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$EgZiIiKBk247sdxlxaas7NKq8EbZ.vdrOlP4n6IzJVUtCw.DaOWbl','user','ak_d6f986b2bfd3ca03','2023-10-19 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$4XwUOekRWSZrPDCmCEhDUaNGisThZzyntmLscRLXOE5br4UEsVPaa','admin','ak_0e371241513d752d','2023-12-22 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Cdlh1wDq3C3weBZ8tupFrxYAkTiFMhYYJ/FnRrIO4UUm36D4v2hDS','user','ak_30503db6cb4867c2','2023-05-13 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$ljF49qifo.K62j88FRghHzUMx6V2dQZsD8AmBtvQdPEf5gp2gh/ux','admin','ak_85ff766652792940','2023-04-24 10:02:00',NULL);

