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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$./MoWsAR7gR/KPlnDzDBkc4MkYaYvakRK/xNpuPWszeaHvALIRcGe','admin','ak_378cbc08d36667f6','2023-11-17 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$1c3X2wLkR3W/Pd1SPeOdN7va10pXZmZ7ksD82p3Dq//Ofw.ist959','user','ak_c862acd9c76b5e30','2023-03-19 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$0OybgXwEWGgjJpDZRBPFNJO38iMbBPbWljdi6xLhBT0CeHnn2HOvn','admin','ak_73f02e76e2228a86','2023-11-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$3a7r.p70mU8T4S5qSw7o66KrjhA9BFaVPZms2PKW9tTqP7dbrLv2N','user','ak_44e518571e7eedfb','2023-12-01 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$9HoWFMacdrKymeE8UvJ/M9AtmMnOx4ekVUsapkj/kUs134m5vCnBd','user','ak_2e381343c53b692c','2023-05-16 10:06:00',NULL);

