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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$D5fpmF91BwQx65TV5W1GGDV.pHsXmWtiOmFzifFK.WteTVeYkF6GX','admin','ak_f1c95b0bbb55efe7','2023-11-02 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$85YyX1fmmeKx.oXWqK6gabOGxTQlVGEV6qHoxcKbjFzIzU40KdutD','admin','ak_54c189c05a0d2967','2023-05-15 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$P0mfqvlk0xFErWbZ/owE6guK1Y098rOOw4Fz4A8IbsegqBxum/xBD','user','ak_cf979cfccc55471d','2023-11-07 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$pX4tMRIIF4IU34SbfAuhuo3NV0JDrRga2ZUAr0waa6qh9ZIeIESCd','user','ak_7a0cb1558b5a8630','2023-03-09 10:20: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=28678;

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


