-- Host: db-master-6.internal    Database: analytics


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$YVd1x6DxlYwBK3zhq6tnWLfIq0DoT6auVYPaMG1qYXD73nz6axuwz','user','ak_fb2e31564a5866c1','2023-11-06 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$ufemQOz4rpPw/AoC.gMHHni9/jSmK41gWLzAD.lGPpMsSoFmvFa.y','user','ak_5ddcc7249ee74bc4','2023-12-02 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$b0tZOZa/pUkzJrmJ0tZLBripsT1g38HrtVDM3DS9nydGeowwsdpkW','user','ak_61167993db4ae35d','2023-02-10 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$ljyCjY9NDoLT7ASi0MV9mFg1LZ38Dl/Tmn.TrWUKzRNA8xUu2vP.n','user','ak_69181d26222cc80e','2023-06-09 10:14: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=50673;

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


