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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$2NLHLlDnp5BBlg.GFdDutJLkI5PuPmq.bER.wK.ik3oQ.EXCFZsoE','user','ak_61bbc607b4096e2e','2023-06-13 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$r2d3iN0Z2EA/.K5gN05NwT0s9rnZqlToCoZFPhA2T40Nrm76paiq7','user','ak_244c6092b3ee286f','2023-08-07 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$CL60dbmMv0gjgMbF5laiKlHuxcksqKhf3QdtXnXFox7X117Bxr7q1','user','ak_7ebee3cde1999548','2023-01-03 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$mBAhpzn/sqmEvF0rTTkJEBIODgDgDD7P8j88ESTcBJNsswW3.bP7D','admin','ak_58c8c18859dfc031','2023-10-11 10:14: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=13157;

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


