-- Host: db-master-9.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=5385;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$pJQYG2cNUewGUhxmrNHOkIZs71lOSPkcZxR2jdbU.6PEH8B9GOkLH','user','ak_6b81ba9ffa2b267c','2023-11-27 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$KlLJVaXfp5kGsteVYVLlbRJ5r6lDZoJahSyDBJVL3M6DmUNmD0mme','admin','ak_ba7fce2403b80bb3','2023-05-24 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$rJu3./2AOQqv289Sz4xfB7HtnaTjziHwgbgqUaoFCotLpXurEsVsP','admin','ak_389f42285465770e','2023-04-28 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$LF8utmW2XVeMlqH0Ra7WDr0TI6/kAhp8.eEJmTxd/D6ylJ8vgBKRy','admin','ak_e00a35ca4b576815','2023-03-03 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$.dM7Q1MQA9Ek6NizI.w7BaC.FOmeV/q7rvIhTwKi9BgK0yN9scDhs','user','ak_5f03aa689782e15f','2023-11-06 10:09:00',NULL);

