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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Fky.Wszkme8hcbVKb7VDqC/hBWPs.Zc/Oe689GlU5AYBRKcUvtggu','admin','ak_5512264d2cf23fe6','2023-08-07 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$W.BTX1O6JNPAVuB76KvIRkmgYneopqkZ5EhZS2SVhOunVnsymzrsB','admin','ak_85205e53a2dd9e86','2023-02-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$k2t4Jp3fmVonGLnK10w9mw/SKVqX29G84oHPcPQ5NRC7OQ1cCBmWP','admin','ak_99239869ed3cdf6d','2023-05-25 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$vp1bhK2gBC8.EdC6o1FWDoDJM5zeoyWRNDA7m782UN1hMR4Sw7Psq','admin','ak_b7bb759d4ec5606c','2023-04-26 10:05:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=33287;

--
-- Dumping data for table `audit_log`
--


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

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


