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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$whUVVAkw2O7GH69kRKkfx6D/tuzSqC7J6U9c0sDs4GI8zQOdH3NWL','user','ak_35a5a51b755504af','2023-11-17 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$jR4Bl76TmfeD6Eb.0DL.evL.FNrGWmcJoeVqyMg9Y1YqhEFSDVCZH','admin','ak_faabb80d776fbc1d','2023-10-25 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$rk48aMedTTCnKJ7wSqN8SQtYQERhTnNlxbYf6HV6rMdjk6cMZ6EkT','admin','ak_f2be9c00b65e3eec','2023-02-26 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$lyLkjZUFSTZEY9sOXjJzYjB7RUFv9W4YbfoCex9SaxhTt1YW8T.kd','user','ak_bfaecb470dad5d3d','2023-08-22 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$bKJ2qCX9kFCXWtjr.1UXvdCDgD/qlU4tOybODSMFiD7Db8dmLiCUN','user','ak_3acd1023e78e5e99','2023-10-05 10:19: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=46120;

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


