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


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$DdpwqAQqHEifF48uPn1sxqXCuZKoPYZhrjazT29/rR3NPiRLA1Mj.','user','ak_f29be0b035f0ed6a','2023-03-25 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$1yZA4Nkli1Y48C1ozmfrroI11sttsaWCB8LVU6svWIogb/rXR5JHm','admin','ak_7ca46a3fccf61534','2023-07-04 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$N.CokSai3LO/eMAON0W8z6tWDrwg/YZX5EBqszqqlw80mBfu0msFv','admin','ak_172105bf33173801','2023-12-02 10:12: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=12067;

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


