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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$oW5PCRs0A2fS4IFWb3pjP4ogAqvoMXN6agb.NF4wBkAcsxrqr.L.5','admin','ak_0342c57b06af1015','2023-12-13 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$p6B1JZGS5exrbAfhABd2hXvSQ5rNVrm.kBUCUqcN/M.so5TqTy0ae','admin','ak_b578b838ee41656b','2023-02-24 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$FP2TuPTjR4bRZghY4ul5xlaQw96qMbfdvyRgMhtzQ0iKdPOcJRaSU','admin','ak_6008488b1e2c2456','2023-09-14 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$SOh1wgksAcLr.DtNAndGubM/aevDXt4aAm8KVAjfjPeubp.6wXRla','admin','ak_00d5a8575ff6e49f','2023-08-01 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$T9toMylbmUjyb8xXkS7s.y0g7z0YfNQ8l5PrLrVNQoZy.W3VZbHTB','user','ak_2b5894e19bbca26f','2023-09-19 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$w2UpmY.jrpz2QAsPJlimjK0zPvNSV/T25OaBm7gnK8wxC2gz6aY2l','admin','ak_f892f02befeb7845','2023-02-25 10:02:00',NULL);

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

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


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

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


