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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$rR1t.IUk8EiTvALQemfPxFhOS9kFW0I.mvLGEbYaZRDfdvNQrPAmu','user','ak_e3ebcf35ce5e0817','2023-12-03 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$LVZEVh.R3AZOAWKMjA9xbn8q3p1Ycz.BcGs.MhDrEzTuIS8wbG402','user','ak_276e10d451fb076e','2023-11-02 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$otwjJGR.GJiiwPDOcoGIyF8JxeXTyHzMBX/wRy9wNmFDhnWkZdNNo','user','ak_c07a5a37742f7616','2023-09-03 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$6Yeqh6ISJcO7TfJk06MUYnXKstrpz6.X69Vg2kmtGofJLx4hrdYSG','user','ak_d776ec56ed19aba2','2023-02-17 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$UeTUhiGQpfUeBKvWpqpdy1zHeLubyizJ2Ns6OPyyVi4bOnl0T6P21','user','ak_12e045a0798e700e','2023-06-02 10:15: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=19105;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=7196;

--
-- Dumping data for table `orders`
--


