-- Host: db-master-1.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=24644;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$oPMI4.W4od8iSO0yHQ89AuAR52pXlYaONNGCm8Ax4wiJLEtuopF5q','admin','ak_ccefcae7d431eabd','2023-02-19 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$qMrmRNAFuSJEtPKUEn84EZP6Xdd4MztvgFcRlhSVyuKC4vDYe3eYb','user','ak_fe7935796a437a9b','2023-09-13 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$BZTQfgknlmuEoOHeIr/kmc8EVQZESQxEKHZOGQ/gv4EqHn16HSzwe','user','ak_2c946df16a2ef440','2023-11-03 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$UnCfA/XkNqhO9YVrc39UMje8Z0BDdtcdp2gdRGWHP4SA/pw6XhbEM','admin','ak_48044ad4af0aaa5e','2023-11-08 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$Z0MlrmmSOTrGhLzJa2iRdUoTPdRlFCart8Vj/CmXP9.USXeALVt0.','admin','ak_96586eaaeef42ee9','2023-03-28 10:22: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=43513;

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


