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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$whsc7S7YxMNy7ge2lCfLyu9oejsXwH2u6FwrQ8.tEvpLW9rVhRXex','admin','ak_593b5a9305a2c3c0','2023-06-07 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$pb1BbkmHAvQAtnU7.DVdFGc2B817ty51GZ2ticpMuFcnaCCREecf.','admin','ak_da84335981683831','2023-02-28 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$Q5qJXLJcb8PswiEwXtY3S2QFw8LN0AOKqGl7TywXiZU335s3l3tHU','user','ak_c42511a69427777e','2023-11-17 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$oa2praxmDDpAkCANmQgJMJcDPBSJzY7.ybvPXvIBxj0hRqd2PACZw','user','ak_d61d2de360a28bfc','2023-11-10 10:17:00',NULL);

