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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$i3F9vJ9yKBXDFmQZdj31NTwvpce9wwTXuZcP5GNTkXQyNmZbafDfG','user','ak_e83b570fde167e7b','2023-12-10 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$spHgoeTv5ly7WQkU/W3yr/AAHykGm6hsDv5IysI1uYEjepEEpDD5K','user','ak_7c32e0eba62ce40a','2023-05-21 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$wUszHVhrnldqXRv5lYhMa0Xv3N6W.u8yIM/Jur1qLV63YnwE42LAX','admin','ak_0d5c9eaac82b0a1a','2023-03-28 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$gRfORXMnM6yD1nzh/rZMa8McgtJ91qrM7bouTQbpWEUI1oqXnuxXK','user','ak_10127e9f4ee7f42e','2023-07-07 10:08:00',NULL);

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

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

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


