-- Host: db-master-4.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=40080;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$HjfTq0XfGq643nPdmO7GeAgBBah1aKS5JKjeqrN2plzoLxP61BClD','admin','ak_f4800db31fbb6075','2023-08-24 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$KEchOoFlWzbUGF8mGjmv9MapeWPxwIdDCmXN04n6cdtirRx8yHjpp','user','ak_566f39f109f0dde4','2023-07-13 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$wYsivrrECqdmkLG.zP4zFLqRR9IT5S4SXoFGkvq.u/6GBV/xmBkeh','user','ak_38852eb3eea19335','2023-10-02 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$yCxG.VqdpCQWre88iwdAu.YZy6hpAbIKPos0QhnKYb9gXszR3PMNQ','admin','ak_9d1ea9293a3c1504','2023-01-26 10:07:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=46160;

--
-- Dumping data for table `sessions`
--


