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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$14imzXikb6x9.NFRpaOOR4YJMNilF8Mza/AM5ZeB/EfpNgx1lGzyq','user','ak_f7cf4378fac0a70f','2023-08-04 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$KHN3quEnxLLGFgaEbgejdH4EbIWB9nv9bgoiyl7E6VHqq0PY3s17g','user','ak_4580e287319985ae','2023-10-22 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$pzKo3gtn8oyTuPusP1ghEn2QLqbBIfgwI84MyFK.rka05BGollRIZ','user','ak_651d69bfbdde41ee','2023-09-09 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$m2LjLbm/sBc5hq.UbGbDAEYTLLJ95a5nn.av79FAh49eHV2SQCemz','admin','ak_3a52445c5b9d21af','2023-01-24 10:20:00',NULL);

