-- Host: db-master-6.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=50065;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$CoeqY0jxhMi1pCA2sUY3YndalStreLe9YWJoFT0tdH96XY0LvsS4A','user','ak_3ae8679cd1e92882','2023-03-27 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$SHx4t3n4s3MWuG917.gVd5OLs4A3RtlIQtdbsPql.ve3PSxBSh9wZ','admin','ak_1b2c47546a56ec8a','2023-06-01 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$2CDviqBVXJ8CPd75hcjnPW9yJdjkU0FZfLX4y0yAx2TzlJ9YV/GOS','user','ak_384490ab9b9b8d42','2023-04-11 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$oTIvTfCA0czOBviV.TK1eUWqCNVPzGsETdlBbaA9shbEHW4oFYDgh','user','ak_99ba181e9e832464','2023-01-04 10:03:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=13482;

--
-- Dumping data for table `sessions`
--


