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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$eDs5Od88kGSWLvuXmKhU8aZY3nvy2zq3l/eAAU98YIW/N.zGYgTYd','admin','ak_44129928407ba2f8','2023-06-08 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$RYqAVCDZZ8ShT59eDtw/Z.xLBZ2KQcqtcagUUsAzU4e9e9MU0PC4a','admin','ak_546a00cc6b86e66c','2023-03-10 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$rn3e7wMJ4TKvlSxYZwl2s72ZiR3nQfPglOBsWkXadGaIvoybaJYu6','user','ak_c5091892f17ca415','2023-07-02 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$hpvasQaeLSwKe0eIDRXtrHS904TLBX1iVDkGL7icgUztRjqGhmGBh','admin','ak_db54ba1bb165b0d8','2023-01-10 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$1LB85ZM6YucTvKxsmOV.5SIvplM4mqEktrj8LY6xuWcMj0mZy0B2J','user','ak_3596e976240e801a','2023-10-06 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@corp.net','$2b$12$NPd/X6ivtQ3ti8ulJJ4ga/cPe.fcEW2BBho97W/2mQ.TS9XQuttF/','admin','ak_a6d50d7e397c1bd4','2023-06-27 10:07:00',NULL);

