-- Host: db-master-8.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=1914;

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$iEcjywi/eo1vDgt.m3pR2bcJjS06Wxxqs9EPVKmgX0b10H.HfwI9U','user','ak_9e41712df5764b74','2023-01-02 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$G4Wc.k8oLRsyDIZ44uAWhJi5aT2On1uFf1c4VStZ5UAywYHBs5NaQ','admin','ak_af1a295255c2f004','2023-03-09 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$b/2/UEW1lhqmiN0w47jHb9UhSQl5QbbBCrzi6cSGiisJ5NdvoQvqj','user','ak_28ea7e1d947f5f2a','2023-03-06 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$Q3oIW8RVUPv75/ltbO8HsRJxh2Y7jbnMmYgAw5X.oixCjHymv1iPQ','admin','ak_0687b4d455ac802e','2023-10-19 10:19:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=25023;

--
-- Dumping data for table `products`
--


