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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$XS7jtdQLYbQmnJUEma6Z4ZJGw2/HweIBerIvOBWOuuEmJ42ffZc.0','user','ak_4cff584297fefac8','2023-12-15 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$wFQGk1KSmMYMUoOsuhK.JqEmTNYLH901DDRSK2ifmrO2s5wEOJKnb','user','ak_9091dee208617210','2023-05-11 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$nE3rR0/lt7Kvcz2yZ4kG9KCGUMbhhD5TJ3fJbL6PTmuQ/2z3GZ.t.','user','ak_77bdca3eadd9c33c','2023-03-21 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$qZtpa1U8t6TIaOVihN8229yUDZWMrPVz50u5.ATRUZXDFRkApYpTc','admin','ak_13d90d714b1ba505','2023-08-26 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$oMv.pNRC0Mq5waVzdBMS8FhINl32zyAV.zpPI9LqDJBvhxRNr0YC7','admin','ak_b6283d10edcdd745','2023-09-03 10:03:00',NULL);

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

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

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


