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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$1UJWlHmoiB6kKpUcAoQ/yoExm.5dfnKig9qlqnxb8J7vLdh1PsSVH','user','ak_b8b190a10477edf9','2023-05-13 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$qNE5LCJTPINkOUEdGbzMplybJXD.19WOfjmKoMcOqYwTpbivOlsWw','admin','ak_94062e8c4701bf48','2023-05-05 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$v5XsVhXUdqKCG4QACaYVgQscUbctaygUwfFPyTYrJV.LhRbtnpuKt','admin','ak_1a5f88472ed004bf','2023-12-12 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$m7eZbyVJto9IrT11cPYV8EJQX6rUY.SGncB2KvHbFycG9.6q8HnCZ','user','ak_94b5055643384d37','2023-11-04 10:01:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=13597;

--
-- Dumping data for table `products`
--


