-- Host: db-master-7.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=13521;

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$yShfwBGotZB27SpVWB./BnxBrYbbvoZgTGvmY2rY6UyfEo5WXiKE4','user','ak_171c356b476370a5','2023-12-21 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$UNhyFJoWUDNIiBebNtJmYbz9RIpyRcPKea.IRSKNC8vQR/ULM.utk','user','ak_ca7227e8253a95b6','2023-03-05 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$2kkfQ/Ttr5rO0Ve5IUxwlqtPMYoqnJgnhFEZy2p0UwXtUN8y9lO4a','user','ak_2bd016b9fb00e42c','2023-08-28 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$4oxfYdAo3FDhDSw1qjE/p.DHv6m/if/XbM.js/ANHE06uTgt76BXR','admin','ak_f518857cd3edcf68','2023-06-16 10:05:00',NULL);

