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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$fmbA7ju3q0P8dV5c4y9zjNM8big52NJOc8VCLXEkOczq.yh30RF6h','user','ak_1958c9e48980d2c0','2023-04-05 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$zVHDH9i/COlEVOjT8gCjjoWMU80fKC5anoHCsB78fSbKmtIgEqCDe','user','ak_dff40306957e7c67','2023-05-18 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$XU5bso8ajoR7JXsaFEhKauvdeF6qtJc8.5qL6Oj0tFR32u3lj.3nW','user','ak_61766ed2da98b412','2023-07-23 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$S45LPiZFpp.oTng30jGhkvETmi1LwB16jY3bwxmv4U5dQf7hx/I6g','admin','ak_a2133844d8350209','2023-05-28 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=15084;

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

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


