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

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$Q2NMh2FXtllpUkhwRVdyWCKkXhrMf60RP7tX018c.gY28Cf5IBfbz','user','ak_ad915b26abb7005f','2023-07-10 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$OTJNSRsP8n5ULwcJpXpsOX6fPgAo4hJIA5kxSysju.XgdoGcZznKM','admin','ak_47c63d7b83a36f9f','2023-08-23 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$YitcYir6fZUS3TPWlcueYG8M6R1qoi/SNxZJFuJmhihXUNh9tlT0T','admin','ak_df715b3da3903141','2023-06-05 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$UdGneIEk/ZP3kR9UYjMladq.iA2uSCoIcdRKnRccQVkcS9TI66Ipa','user','ak_bf753b247e20be3f','2023-07-10 10:20:00',NULL);

