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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$dlDCjvxtw311d6VppBHuwRqHdLs8ORNRk/jdsXOjO7qutHo7Eif1k','admin','ak_e893e1f32cfd4215','2023-12-02 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$S9bwXkxzGzxrsBNTKB3l6Q7L3aDJlDMtEumh3d9zjG/8hqujqhh0C','admin','ak_a9e1deb2e03a98cc','2023-04-26 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$rVw.2VyDiqZH0TlD2RYW4JTc5LPmuz4fcBW4IolhZAw8bZFhl0w2p','user','ak_395e702f728db27a','2023-04-02 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$fdeEiki7MpF1.utfVo1JyK26Un9BHrg0e3s7Znm1rw8q464Gxnbc4','user','ak_627fc1c11dc7ace9','2023-09-23 10:04: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=45452;

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


