-- Host: db-master-0.internal    Database: main_app


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$9xorS2IKVmm5ektDcUe.RHHI8HlqdYl3Iz4txynUvYRcQPz7fmwwf','admin','ak_81a7e41fe17a79cd','2023-04-11 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$UqRCzd4npzXocS.CzejOmdTgwNiBJbq2G43jWuMCN0pJhwC7cJ5wM','admin','ak_37fe5936afd3f28d','2023-04-16 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$clkD3AQFhZFa.gvn.aJ1Ro.DNfbHMgE9qhUkfN3IryUlvCr0/TBfO','user','ak_603445ddf4cc9bb1','2023-07-22 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$opDngm1fyIpWcqQwKbF3sS7.HSAEsDt.O3WRSoNRQ1s1eOJj80LvW','user','ak_cd8bfcff6ae7b5c6','2023-04-25 10:06:00',NULL);

