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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$VDSPDkD7ZMF8YL3c.AsT43hwQN5FcOoCC0a9COKifVEr0ugPcLSqT','admin','ak_8b6a47fac3fbdb90','2023-01-01 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$rfnoUUQnhRhb3TaUUpBte47hHXPRl7OVmTYRFyjpduj.WuAYWPY7/','user','ak_a26b27f7b2326888','2023-09-20 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$KkOX.CBpqhUmSmfnZSAiigle8X/xSdir8dhPriWyjosnUArNgXgLZ','user','ak_e50829d731525e01','2023-12-12 10:07: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=3644;

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


