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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=43654;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$NiXlQBurV719ij0.aIQWdZgqpZ73ieGrqUDY9A/mRHTpJ6IoJCyov','user','ak_05a507c7983f2c68','2023-10-03 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$T0OJpLlXpAU7pyL5LAJl1XI7xLvRdz8suTxRLozLAsaPbvtViOChM','user','ak_bda3afda14083fd1','2023-08-09 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$NKthm9ctmFih0cVqarThPliy4SmLJeChBCj3YlckwqwTb7Y3QTwLt','user','ak_d8d283e4736ac43b','2023-09-06 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$CcSOmD18GW0SgFkUW2TzTNJGhftEtvnuPaNHlzUtCKmBh2QepWdoK','admin','ak_6b0c84440d8c6bed','2023-11-15 10:09: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=40960;

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


