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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$26BM3ocMMIPi.pKjkYcC0mtsjCpyCtr5nLxibDcMyv9uidL4W1QkM','user','ak_32d5a4e4fd0c4dc6','2023-05-23 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$IRXEXyW33SSl05LiTF5.mnl2tvTYop0IZcjmPTXj3OaHVCwVD6baN','user','ak_275403f2ecc889aa','2023-09-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$w6fziG0/2LE9Kq1VEvie10HVChXqgRdJ6cO2MMmvtMqaaZEFRZJCd','user','ak_648c3848b911b177','2023-04-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$9NS/JBkpZp75QhlbaIh.nw5DDlVfXCvTx4S8YBYjR0we8yF.pw2gB','user','ak_a027d436459356e2','2023-10-24 10:05:00',NULL);

