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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$lsNVZjR14sbSqoM3y6ZnUnpqWckDZRJjLal1wM1KPyU7zC7fKnHY/','admin','ak_8f02d27ad1116269','2023-04-22 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$dgYPJtUsJhz7EKsHs1uwqLwHahSToKSyqB6K.nDziAX.MO9DPd9TQ','user','ak_735323fb2b6e7db4','2023-07-19 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$3RTky9vKQgWChnmjJHRDL8T8CVi3edSjCFWPmOkK/91yQ4CG01KaS','admin','ak_f89bde8e110a1fcf','2023-12-26 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$cZIcLafHOjA09PQpycQaISH8y7y5xOOrg2GwVi0UgdkdYR7tL2JQr','admin','ak_14f6a561340ced50','2023-09-25 10:07:00',NULL);

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

--
-- Dumping data for table `payments`
--


