-- Host: db-master-1.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=32801;

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$tCOWU3tPebRA.Jwx9v4VVRy2WV3YvLlQDrh1vgI6dYh70XiJia1QD','user','ak_94ad0335ac7a2dd5','2023-04-18 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$X2ThiWANNln4pUW.qnwc2lkVuCP/dHqRzIK1G/9uYIrU8RGMkixz8','user','ak_47df0cb87a690a8f','2023-01-04 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$7Gb8m3I71UCW75Wdfy1RkePwAQ1DFhFcVcbSG3GUlfJhcu609DiAk','user','ak_8c7fda4718749bbc','2023-09-22 10:21: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=28057;

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


