-- Host: db-master-8.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=48099;

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$bEIlrwwyR29xJoOPBfTK0Fpid5X.eKlII3UTke6T.mRTgOgiYDzeB','user','ak_f42b59d98cd47f1f','2023-08-28 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$LnTpALveljPBjYJr9odz1VaBXcra12Ph9cRsU07kgGcLjjlQviAmr','admin','ak_c9c03996e6060ceb','2023-11-06 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$lCYsKXnEROKqwFPgTjKCfsZZDBa2pcIVUqHlelgXSEAEjv.thF3W/','user','ak_3959c53c65b3244e','2023-11-22 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$BoEMfxGHmZm8X7Vf70UTuG8hCIXD.nTJl1SxCMuhk.THX8d311L3O','admin','ak_e2f57dc4ba371a92','2023-06-19 10:16:00',NULL);

