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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$XBNmpc1XLUPlm7TgIp9k3q87omMwGsTQnM0PYjmlZYKtXEhu96axn','admin','ak_1c788fe92bdce5f2','2023-07-11 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$CJgCbIXVO6U1Dx9q.dKl.BRMUgOi0Ghb2GDvioCwTl0nwPgDDGmyq','user','ak_16635c25154f86c8','2023-02-11 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$uMuu/Wf5Vc.aBmElm//heRemnJ00Oiv5MlQD9uBw7CTz46sGmKOxI','user','ak_fdd2786ca3c2d93f','2023-01-12 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$OvjayMMzAO59pQFBqsBse0MPISzHeZ91ScK10OqhBOJBrlDfCEVui','user','ak_731eacf24990f670','2023-02-17 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$FDTn7x.lgzWvUSmIbFOK0MFeA1wmxarx0Lh9ayZxZ6SJtyG6v7yhp','user','ak_564b29e8c3c51714','2023-10-01 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$EReS84QZdO2EqIWEjJshseSO5rQXWEeOO6ylM19fqTDjUQg15nomJ','user','ak_9d49733f9bc8ce44','2023-06-10 10:05:00',NULL);

