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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$lYYtiBOk7hfnfQfwmS.O8mwBjPrR17hbs3Xh/uzwTL9pnoozYtc6l','user','ak_b07acd82cefe901e','2023-07-23 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$tDz1ojlJYh3h9MRNH/YEas.Zcez0.PQDBsS.6IWPdaa2B6IPoRiQv','user','ak_30e7166def68a8c6','2023-05-07 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$zaZ7HPz7BaGzHg6KYO4RZ68PmH8hfabzFM01KLmzAxwPfFJ90BrAp','user','ak_accaadadbd9f21c6','2023-11-22 10:05:00',NULL);

