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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$R6Nu3H9.MDRVhz0xsFM0/gEMp6cMftJOKkvTnLzPtwdyBcUvDfebs','user','ak_ea505b176d7e3e77','2023-08-21 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$UFlrtiH.GfInXw4fsBAzNOlGfFE8hnPsTILq8ZBAcKRguuogLA9Wy','user','ak_9ce138de83c161b4','2023-08-23 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$CKrVSY77NX7vT6fvIVFrdZG7Z3kQKwKLYkcqrfYtxv6tACLj42GIW','admin','ak_2e65f72d5afeab6f','2023-02-17 10:05: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=21137;

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


