-- Host: db-master-6.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=32167;

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$7R9KYEYtVMZsUP/dWCLi6G5qOXJFbkrLGSLPvEJFnelU8plhbvA59','user','ak_53e177fc068a6bd3','2023-08-14 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$yIon5SfQB.J5h8Njt89DgowOgiaOfww9Lm95OyjnuD7siDmRjDCtH','user','ak_baf2722f13fb2b11','2023-01-11 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$3PP.2geF7eH2xD5OhptJfOAZdg3phcB3HA5mvR8YPPC/R5QnS.zeR','user','ak_1a208e7ac4691cbf','2023-12-24 10:22:00',NULL);

