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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$JF2OE8eA5SLgF0CZnYMjkun2Kd2crCXUW3PuKyLOiNbdYgaDrr/ll','admin','ak_dca374852c3f1baa','2023-09-04 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$.FcXI43UV88C0ESfaujvmHCjmem7QpyVb4KIM3J3iiImATFs7KhbP','user','ak_02991b3dd6e31658','2023-12-18 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$N5ZL.4WnyxPSGRgermwIfgDtXH4poIezPX79Wvve3PAMyoKU/tYAu','user','ak_6256b0e775f201a9','2023-06-15 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$SVgxxWnP1K1ibTnNrW/gKSK.m6ktADg4iOOsSjmVn5FoUeIYCo9pj','user','ak_9152e570babe767b','2023-03-18 10:08:00',NULL);

