-- Host: db-master-4.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=44154;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$YntvEhT7ftt2cykRkbkmhzciaLZJWHG7irF4CYF6jer0BVB612H9s','admin','ak_2b8ec31d81442692','2023-04-23 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$6Cqwn99krTrI8BVKWIpXE351wqG9kCe./2lY7XBiSNUlNo2SSGZda','user','ak_d0630a706afdcf90','2023-11-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$3m4kAeWUVyFmyAn360OQ6IcvLmuaKCk8sn7MqGz9jH9ADsw7oT3XE','user','ak_3bd957392ed65f7b','2023-11-01 10:03:00',NULL);

