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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$AFntoCpXJkXmt4rVZDqipeapvZUxMnvRukX43l91DfLBhkNcqDzpZ','admin','ak_ada46859e9bfcd35','2023-01-05 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$kRI0FSMOLXd4xUtn1O3wtMEvtISgDahaKdkZlfTWRs9KWLsxdmCB5','admin','ak_c232b0ef6975f63b','2023-10-07 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$vhXFLWXzYhGsXgHXCRss5HWE02C.l8arEC0CbqLNP/A6r6GjpTg/4','admin','ak_84e80ef113fed857','2023-04-26 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$gfmY.jtsNvzmhaGkHcSD4rse/dJjpZnoqvvc3eC..80/t070gnMAM','user','ak_e83125ba709831ed','2023-06-06 10:15: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=21038;

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


