-- Host: db-master-4.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=50770;

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=20967;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$1dNmF2czlwaRmoLiNUFWBXXvLms.GNCgXou8Va6NA32V4usvIMTMQ','user','ak_1fd4549ecd038594','2023-03-24 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$/lVqZGMHqHMfWmPLIrom3jA/i881L6TBT1uNOtqJSS5496xt/yBZV','user','ak_3cfacffa66de04c1','2023-08-07 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$zjZWg8NHGHWX5WGXC90sFrB6uIKBUOcpvIj8M4OSWRIiqNnt9oSVc','admin','ak_5f7da9a72c67e72e','2023-11-28 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$StMIH4KUB/J3koACG54sBC8EXar..xAMEP6mHDBmVTbkHzDznZNpH','user','ak_deb4769d0149bb96','2023-09-20 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$L7MhEqiF8ezVV94pXuk0CgVuzoHc81wplA1N00g7VorcSQZBUVEgL','user','ak_52bed45c6c921208','2023-02-19 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@company.com','$2b$12$cKxiik5MGH8tL6tl53T6diDszO9M8n9dyZR3rcDlYNRdiq56he2W4','user','ak_48882e4c7afa0250','2023-01-12 10:23:00',NULL);

