-- Host: db-master-4.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$pr/gk0jvatGNYE9274nju5cn6pAJjdcJwuSQBC5t2j5eGvS0Yr6lR','user','ak_fdd2a0faa5e733eb','2023-11-11 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$XUGjxQaYsyFxHNmSfbZ2.jf1qqhR/KdQJViykpcfqsfJ.KOpnSROc','user','ak_0fed7c0b6f0d8142','2023-05-16 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$NAucl0oSee/R0lR8gH4c/QfFpnvKGwJG5PqLP8q3jLx0DDj8KfCc2','user','ak_933fdfa3bf96c57b','2023-08-05 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$foKv0gOt0ENuOwx8OsDBGsVOTUug./kPio8PyKRskUuu8Hmne9uL2','admin','ak_121e323545d06d61','2023-08-22 10:03: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=18929;

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


