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


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$u3ZW6w9OB41qUeoH7U58tO2BbF/jT6hmmFTvOZuM2oQH9/6dMBEgS','user','ak_2a8fc5750150eca6','2023-10-07 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$xO5vtvdxXNkYibN5JO0deA9ZFiMPk6pGT3PlQa0/rz.55XxRqND9f','user','ak_b2feae27c965204f','2023-06-19 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$PBJwsX4z0B7a7uzHiCjB5pBz/2bAg11fb7MBqzTtDDGCG/z4kgw6I','admin','ak_80bcdd802b9ab8ea','2023-08-25 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$KdBKHZ7m1F2s3MZtIzVG/u.D5b5aI1Z9GIIALwedPIInjsobiTh1L','user','ak_408d179c21821ce3','2023-07-03 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$/wYQIUIOfja27Yx8ay/PBe1hYur1q6qCi5q2CxvHU1DeM2i9Iejck','user','ak_b2b500b89ea4f05e','2023-08-17 10:03:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$MCqFi1qE57HQWiuCoTuhepJuMuGJoSGdI4xP0Pkoifv5hoDeDiuQw','user','ak_d4d2f1a9f37316e6','2023-01-22 10:02: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=30546;

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


