-- Host: db-master-2.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=11107;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$ZR3VeOXl4H9FC1NoKY6M85Mk9DjjFkoPl0OC1xzZf2.8PEhuokI8u','user','ak_3d9744998fc5636b','2023-02-21 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$mbPMAXrWW0GeKPytcq.rpQ76RVyDSpMh/fU3IY/S83uCVOiZZ1N0t','user','ak_7b4159c85800be5f','2023-07-01 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$d.WuN20ghMoFs5vOyRsWnAfjIOIpOGMpB8.yqATeVwau8h6O0NmUW','user','ak_77c4459119591cde','2023-02-22 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$hcLmhls0rcaozegb2Hd4rwVE9n0pCGyHRZMr9wJXIuHFQnw7KRy1w','user','ak_db7a6f88bacada81','2023-10-27 10:22:00',NULL);

