-- Host: db-master-1.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$QwY3BJniY3hNh9v/dQQiJWJLriFQjULkbUKYYlq355dcdX/uVCxzh','user','ak_053566717d45d34b','2023-11-25 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$aGsOOJZEvl7mY7HMeZXdW8K5UyGI4Cm2tjwk9AkE5tjlbynY.by7m','user','ak_4a68de43480dd640','2023-10-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$mznymHTAQg8qh4ZfHF51gpAa3Ww2zdEpfOXukL7/fh4nsw.xBdMJa','admin','ak_4cd8fe99270004f7','2023-05-02 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$GbpyuxnXYX1Q71pMt3JFJiJoW5ie2wSkTIOQUtMe.7IzNHmXDgaN4','user','ak_8d73acefa550e134','2023-08-11 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$mFxhXBDhVsD2dUgAn49zrPFeJN5a7VBfy.PnlagT203oHjr8OIyoU','user','ak_75a06f36297a8a5b','2023-04-25 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$LI90tNiLyZTyLcouIG7FwM9voPkXOC8SwaINLsCsebtXHuTKF9O5T','user','ak_1965421594a3604b','2023-11-07 10:16: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=7115;

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


