-- Host: db-master-9.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=4775;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$wyYunv43Zcd6mLnpFt/1IcWXA5ozEZ2rzW3uBIk3SjYUx4gD/3QVD','user','ak_488002b0f2efd63d','2023-07-25 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$2pfhy6fAWLAgd3HNwCr.StaqQHIVEdqXKvBt1iHRUD61O1s4zKNL8','admin','ak_bc83734b118bd26c','2023-04-20 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$6H1rnskOb.V.Tm0rC2EnrZRy8VPb3dttx6MoJZntXhZ0vIK4ORFfh','user','ak_86b064e1d83f4e3a','2023-02-20 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$jStZ68JmMtWGDN19Y94uUCunigxC92QtxeLY2KsgwgMfT27IoGX7e','admin','ak_1a25e5734b70b549','2023-05-07 10:05:00',NULL);

