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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$zk9Wl/zpvKOw38db6vwLzAMlGwRcqeGgS8oPR9Tmc86n9wxmKCZ.4','user','ak_1ba5f84330007051','2023-06-05 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$n5Tkr2txWQbBiGAmEqpzdptbJejAXZ37qxPRa4zZjhCAhNUAd05Yz','admin','ak_759ded01899e56b1','2023-11-18 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$E61FKezWpLeNZ6mj8Q6df5DvDWeVmXHjZUM27ZlsvHMgG/ljwXcuX','user','ak_4c743c9cf223f862','2023-03-17 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$Ec0g7YXi5Jz.L5MvMQsl0drVW52TXR..3..oybABx.n9xJrWwtVqM','admin','ak_d072b1e5941ade56','2023-02-13 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$ezP9hfBN4vRrMgJf4kGNRynejVgCquwzmg0C9kFfXATR7Qx/Soa0O','admin','ak_fa2f12ce785316b8','2023-07-24 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$f7ZChJA1jDeVBbe6xD2ou9NqiOjPManmzHrzJAzNm.yP9w2DxYUSH','user','ak_6d2aa1788cf26c7b','2023-11-20 10:02: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=32747;

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


