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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=7488;

--
-- Dumping data for table `payments`
--


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$n/A9NEK1dFskDeuGfuv.idLh0eAZ6fDASL5ZM.hZj.Ek4kcXP3zSk','user','ak_cf99f5bae477373f','2023-12-13 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$uX4MqUr5H9wHneKjbTUcT1m3//LEqOLaWw2SlEGqqV/UehYIrab/T','user','ak_57da7967b1d1c865','2023-03-19 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$Q46Uh0VfjyXP3qocOJVA810vfjuCSnOYKeAwkozDhiF.TDLgFomAS','user','ak_7adb592739241b14','2023-02-08 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$BrhGjelnfEtafGMubrMLzJzYgPqKqudiFYd2qg99IiW0gzjzYxT6Z','admin','ak_4f409314cbb52272','2023-07-22 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$AJ2kh.e17sGj1yMuaAnF.pAwArFIosIcUPH7jJlS8sd8S5lmODnJZ','admin','ak_cedf9eb6d15c38c7','2023-01-20 10:03:00',NULL);

