-- Host: db-master-1.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$8lv16Y968gm9NQlO2gpLe3K8uFymtlHNWH.jcB0XniHRhH5U9qfqF','admin','ak_e6bac3b4334ae4b0','2023-01-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$9Z1hQwMNGUJEGCNAT3n8lkmkXtmrVhgcVudMpmbq9jRIK9NCGREey','user','ak_f40a94cb9957182e','2023-04-05 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$21KyrqGzrijx.3sxVXg/BLX9soiylrparFictm9irlU7RRvpHCcra','user','ak_fb89181ca5598f50','2023-03-19 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$5JwjYHaUEI2VUFoEtuRUdRcgAUjv/D7fhCXDZhYNhaEJ1y0xT5uQX','user','ak_8572f7356e1d993c','2023-08-21 10:16: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=43084;

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


