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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$fdnVdfQeSPG9vc3tqBHuIolrgFORO8rIboirtDMNV8hdjfHcRaEA8','user','ak_6da561e9f0407e0c','2023-10-01 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$IdIANczSutZaxzTVSdPuvqEXpZl5wRyg3bvhnbxTp6.jwj6l1CDdT','admin','ak_ca15a27a27700d70','2023-11-20 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$AQzp080cFaYsnUYtqEz4OvwD0xBxiW1w8102qP5MgHlu92ieisqqQ','user','ak_8d3ed96183246752','2023-02-02 10:09:00',NULL);

