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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=18369;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$fBz4wWsghR66GKjayHpk461z5lmRyAaCcXfoQPkc.7.eQbbFK2Li0','user','ak_91210551532c1059','2023-10-06 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$eJjamnMemVEsAlK3E0mkwQP1SqX1GTUafw2qsTDCE6y61gdsq8Cgs','user','ak_3654f2c189db8259','2023-12-04 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$yngRVL0TKDEgO1iUre1bgkOzxpDpW8312Vv4nmPHJ/yjnTUlvkHHT','user','ak_716c7265c37f84bd','2023-07-05 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$qTpSD2if13qnMt4utSr.p10S9cW4/dNFLCcOvc0LhqdnpFwSA/OVN','admin','ak_e6f52156d47b8db1','2023-04-02 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$f42M.0t2d3HcAZMNc57.0YkixH3XVBkBi5.taKJWxB28aXsSbItQJ','user','ak_6533d2c6bfafbf03','2023-05-22 10:15: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=21845;

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


