-- Host: db-master-6.internal    Database: webapp_db


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

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


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$TlHFiiGn/nrw7g3HhYgFDxzf58T6MocPs75Evml2/1Afrcfl.sQLo','admin','ak_b5f0401f3daf5e9a','2023-08-23 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$iwVECNatMtFI9c4aCuMpoVhQXTGYuULMvttgyW2Z1XDwAQnXVXIZy','user','ak_f27251320c39455f','2023-10-06 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$e839MwyUc8pXMcMnAJQMMnRcIB8FJmc0dt/qRdVLsKzJrp.FTGkhN','user','ak_6fa55c7148c9b001','2023-11-28 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$fQVd.9BmlcgCMAZptDZ2VVsqiFsW425wm7ruh3FwH7KtqSC774MmU','user','ak_8d791ff4b33e5623','2023-02-05 10:13: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=5031;

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


